I am working on laravel 5.1 and using jessenger mongodb package. I am using raw query to fetch data but i am confused how to use date with that as currently it is returning null result.
$resultSet = DB::connection('mongodb')->collection('wc_mycollection')->raw(function ($collection){
return $collection->aggregate([
[
'$match'=>[
'created_at'=>[
'$gte' => Previous day midnight,
'$lt' => Current Time
]
]
],
[
'$group' => [
'_id' => '$some_id',
]
]
]);
});
what should i do?