Enable eager loading
This commit is contained in:
@@ -32,7 +32,10 @@ class UserController extends Controller
|
||||
{
|
||||
return view('users.index', [
|
||||
'country' => new \League\ISO3166\ISO3166(),
|
||||
'users' => $this->userRepo->orderBy('name', 'desc')->paginate(),
|
||||
'users' => $this->userRepo
|
||||
->with(['airline', 'current_airport'])
|
||||
->orderBy('name', 'desc')
|
||||
->paginate(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user