lundi 12 février 2018

Laravel eloquent multi relations search column

Trying to figure out how to make a search on a specific table from the below Laravel Eloquent query:

$user = \App\User::with('profile', 'languages', 'contacts', 'photos', 'jobs', 'offices', 'socials')->get();

What I'm trying to filter is a user where in the profile table the 'full_name_slug', '=', 'john-doe'

I've tried forming the where clause like 'profile.full_name_slug', '=', 'john-doe' but without success.

Probably this is quite simple but couldn't figure it out from all the Laravel 5 documentation.

Thanks in advance for any help Cheers



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire