I am performing a query in which desirable output is first apply where clause then after I want to perform right join.I have this query but it perform first join then where.thank you for you any help advance.
Here is my query
$friends = friend_list::where('friend_lists.user_id', '=', $id)
->rightJoin('users as u1', 'u1.id', '=', 'friend_lists.user_id2')
->where('friend_lists.user_id2','!=',$id)
->where('u1.id','!=',$id)
->orwhere('status',null)
->get();
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/21sdRh4
via IFTTT
Aucun commentaire:
Enregistrer un commentaire