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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user