Add acars map page and show in-progress flights

This commit is contained in:
Nabeel Shahzad
2017-12-27 16:47:22 -06:00
parent a2e2a2a6a7
commit edca0644ff
103 changed files with 12380 additions and 827 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Http\Controllers\Frontend;
use App\Models\Pirep;
use App\Repositories\AcarsRepository;
use App\Services\GeoService;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class AcarsController extends Controller
{
private $acarsRepo, $geoSvc;
public function __construct(
AcarsRepository $acarsRepo,
GeoService $geoSvc
) {
$this->acarsRepo = $acarsRepo;
$this->geoSvc = $geoSvc;
}
/**
*
*/
public function index(Request $request)
{
$pireps = $this->acarsRepo->getPositions();
$positions = $this->geoSvc->getFeatureForLiveFlights($pireps);
return $this->view('acars.index',[
'pireps' => $pireps,
'positions' => $positions,
]);
}
}