jeudi 12 janvier 2017

laravel 5.1 : how can i have two wherePivot in eloquent?

I need check two where on pivot table. I know that I can check with this :

$dis = $user->discounts()->wherePivot('used_for_id','=',null)

I want two where. when I use OrwherePivot two where be "or" but I want "AND" two where.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire