laravel query relationship nested

36

return Event::with(['city.companies.persons' => function ($query) {
    $query->select('id', '...');
}])->get();
return Event::with('city.companies.persons')->get();

Comments

Submit
0 Comments