Enable eager loading

This commit is contained in:
Kevin
2018-08-26 21:43:47 +08:00
parent 996ebde501
commit 7b8e20f348
3 changed files with 15 additions and 7 deletions

View File

@@ -72,6 +72,7 @@ class FlightController extends Controller
}
$flights = $this->flightRepo
->with(['dpt_airport', 'arr_airport', 'airline'])
->orderBy('flight_number', 'asc')
->orderBy('route_leg', 'asc')
->paginate();