many to many eloquent laravel nested 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();