I want to make a query with ORM and use (AND) and (OR) inside together My code is :
$users = \App\User::where('type',1)->orWhere('type',2)->orWhere('type',3)->where('name',$name)->where('family',$family)->get();
That is False
my code should join
$users = \App\User::where('type',1)->orWhere('type',2)->orWhere('type',3)->get();
with
$users = \App\User::where('name',$name)->where('family',$family)->get()
how can I write true Query ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire