vendredi 21 juillet 2017

How to use raw query in join clause in laravel5?

I am using multiple condition in join clause in laravel5 and there is one condition that is passed as a raw condition. How to pass it ?

I am getting this error Call to undefined method Illuminate\Database\Query\JoinClause::whereRaw()

Code is

->leftjoin('log_simple_calory as LC',
function($join)use($tz_lccreated_date,$dateRange){
  $join->on('LC.user_id_fk','=','UA.user_id_fk');
  $join->on('LC.is_active','=',DB::raw('1'))
  ->whereRaw('date('.$tz_lccreated_date.')'. $dateRange);
})



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2uIbVJL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire