I am trying to find count of gender using the raw statement but i get this error
Parse error: syntax error, unexpected '$total' (T_VARIABLE). Can someone please tell me whats my error
$collection='{gender:"Male"}'
$total = DB::collection('leads')->raw(function($collection)
{
return $collection->find();
});
return $total;
via Sanjana Anand