geoSvc = $geoSvc; $this->acarsRepo = $acarsRepo; $this->pirepRepo = $pirepRepo; } /** * Return all of the flights (as points) in GeoJSON format */ public function index(Request $request) { $pireps = $this->acarsRepo->getPositions(); $positions = $this->geoSvc->getFeatureForLiveFlights($pireps); return response(json_encode($positions), 200, [ 'Content-type' => 'application/json' ]); } }