php - Laravel - Eloquent where with relationship? -


i have following code:

return technology::wherein('uuid', $technologies)->get(); 

$technologies array of uuids , in $technologies table have uuid field.

so return technologies match uuids, have equipment_id in technologies table , end game goal list of equipment id's belong technologies match uuids in $technologies variable.

i foreach loop , add equipment id's array wondering if there way eloquent magic include equipment relationship query.

something this: (this doesn't work)

return technology::wherein('uuid', $technologies)->equipment->get(); 

i think called "has many through" relationship.

i answered same question at:

how fetch data using laravel eloquent relatinoships


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -