laravel query relationship nested
snippet in php

laravel query relationship nested

user6529

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

laravel belongsto nested

user6958

return Event::with('city.companies.persons')->get();