diff --git a/app/Http/Controllers/Frontend/FlightController.php b/app/Http/Controllers/Frontend/FlightController.php new file mode 100644 index 00000000..e8dcafda --- /dev/null +++ b/app/Http/Controllers/Frontend/FlightController.php @@ -0,0 +1,37 @@ +flightRepo = $flightRepo; + } + + public function index(Request $request) + { + $flights = $this->flightRepo->findByField('active', true); + + return $this->view('flights.index', [ + 'flights' => $flights, + ]); + } + + public function show($id) + { + + } + + public function update() + { + + } +} diff --git a/resources/views/layouts/default/flights/index.blade.php b/resources/views/layouts/default/flights/index.blade.php new file mode 100644 index 00000000..16e03c26 --- /dev/null +++ b/resources/views/layouts/default/flights/index.blade.php @@ -0,0 +1,12 @@ +@extends('layouts.default.app') + +@section('content') +
+ {!! $flight->dpt_airport->icao !!} - {!! $flight->dpt_airport->name !!} +
+ {!! $flight->arr_airport->icao !!} - {!! $flight->arr_airport->name !!} +
+{!! $flight->alt_airport->icao !!}
+{!! $flight->route !!}
+{!! $flight->notes !!}
+{!! $flight->active !!}
+