I have a query with Left Join with AND I am not able to implement this in laravel 5.
An excerpt from the query:
LEFT JOIN visitante v ON a.codigo = v.id
AND v.data BETWEEN '2015-06-01' and '2016-05-31' and v.status = '1'
I tried this way but it did not work:
->leftJoin(DB::raw('visitante v ON a.codigo = v.id
AND v.data BETWEEN \'2015-06-01\' and \'2016-05-31\' and v.status = \'1\''))