Bid check for flights/show (#1278)

* Update FlightController.php

Add missing $bid to flight/show so when needed Load In Acars button can be placed there too.

* Update show.blade.php

Add Load In Acars button to flight details page (flights/show.blade.php)
This commit is contained in:
B.Fatih KOZ
2021-08-10 20:23:43 +03:00
committed by GitHub
parent 54c3c8f346
commit b6abe8dd5b
2 changed files with 12 additions and 1 deletions

View File

@@ -223,9 +223,13 @@ class FlightController extends Controller
$map_features = $this->geoSvc->flightGeoJson($flight);
// See if the user has a bid for this flight
$bid = Bid::where(['user_id' => Auth::id(), 'flight_id' => $flight->id])->first();
return view('flights.show', [
'flight' => $flight,
'map_features' => $map_features,
'bid' => $bid,
'acars_plugin' => $this->moduleSvc->isModuleActive('VMSAcars'),
]);
}