Search Flights By Flight Type (#987)

Flight Controller : Added flight_type to return

Flight Repository : Made flight_type searchable and added its where criteria

Flight.Search.Blade : Added the flight types in a reasonable order as a dropdown (like schedule pax,charter pax,cargo,others)

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
This commit is contained in:
B.Fatih KOZ
2021-01-17 20:23:23 +03:00
committed by GitHub
parent 29ff0758a7
commit a5b83185f5
3 changed files with 29 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ class FlightRepository extends Repository implements CacheableInterface
'arr_airport_id',
'distance',
'dpt_airport_id',
'flight_type',
'flight_number' => 'like',
'route_code' => 'like',
'route_leg' => 'like',
@@ -93,6 +94,10 @@ class FlightRepository extends Repository implements CacheableInterface
$where['flight_number'] = $request->input('flight_number');
}
if ($request->filled('flight_type')) {
$where['flight_type'] = $request->input('flight_type');
}
if ($request->filled('route_code')) {
$where['route_code'] = $request->input('route_code');
}