lundi 7 mai 2018

Eloquent - Query model using where and or

I'm looking to query a model, where two users can access it based on whose signed in.

So I have a owner, and a responder whose id's are released to a survey, and there can be maney surveys.

Can something like this work

$survey = App\Survey::where('owner_id, Auth::user->id)->orWhere(responder _id, 'Auth::user->id);



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

Aucun commentaire:

Enregistrer un commentaire