Answer the question
In order to leave comments, you need to log in
How to speed up LeftJOIN LARAVEL?
There is a request like this:
AllItem::leftJoin('items',function($join) use ($case){
$join->on('items.classid','=','all_items.classid');
$join->where('items.case_id','=',$case->id);
})->orderBy('items.created_at','desc')->select('all_items.*')->paginate(10);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question