Add flight_time to searchable fields (#1356)
This commit is contained in:
parent
4ea8357952
commit
66d83c0ce6
@ -21,6 +21,7 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
'callsign',
|
||||
'distance',
|
||||
'dpt_airport_id',
|
||||
'flight_time',
|
||||
'flight_type',
|
||||
'flight_number' => 'like',
|
||||
'route_code' => 'like',
|
||||
@ -133,6 +134,16 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
$where[] = ['distance', '<=', $request->input('dlt')];
|
||||
}
|
||||
|
||||
// Time, greater than
|
||||
if ($request->filled('tgt')) {
|
||||
$where[] = ['flight_time', '>=', $request->input('tgt')];
|
||||
}
|
||||
|
||||
// Time, less than
|
||||
if ($request->filled('tlt')) {
|
||||
$where[] = ['flight_time', '<=', $request->input('tlt')];
|
||||
}
|
||||
|
||||
// Do a special query for finding the child subfleets
|
||||
if ($request->filled('subfleet_id')) {
|
||||
$relations['subfleets'] = [
|
||||
|
Loading…
Reference in New Issue
Block a user