get all models in nested relation laravel code example
Example 1: laravel query relationship nested
return Event::with(['city.companies.persons' => function ($query) {
$query->select('id', '...');
}])->get();
Example 2: laravel belongsto nested
return Event::with('city.companies.persons')->get();