I need to have something like this:
"results":[
{
"id":1,
"date":{
"date":"2015-04-1 00:00:00.000000",
"timezone_type":3,
"timezone":"America\/Denver"
}
},
query:
$find = DB::select( DB::raw("SELECT created_at as date, 'America/Denver' as timezone, 3 as timezone_type FROM table"));
return Response::json($find);
How to create date within date with mysql/Laravel? I tried to use array_merge but date will be appended at the bottom instead of make itself nested.