aircraftRepo = $airportRepo; $this->subfleetRepo = $airportRepo; } /** * Return all the subfleets and the aircraft and any other associated data * Paginated */ public function index() { $airports = $this->subfleetRepo ->with(['aircraft', 'airline', 'fares', 'ranks']) ->paginate(50); return SubfleetResource::collection($airports); } }