Add callsign to flight search (#1341)
Make callsign searchable Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
This commit is contained in:
parent
f498ad3bba
commit
9956929df7
@ -18,6 +18,7 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
|
||||
protected $fieldSearchable = [
|
||||
'arr_airport_id',
|
||||
'callsign',
|
||||
'distance',
|
||||
'dpt_airport_id',
|
||||
'flight_type',
|
||||
@ -94,6 +95,10 @@ class FlightRepository extends Repository implements CacheableInterface
|
||||
$where['flight_number'] = $request->input('flight_number');
|
||||
}
|
||||
|
||||
if ($request->filled('callsign')) {
|
||||
$where['callsign'] = $request->input('callsign');
|
||||
}
|
||||
|
||||
if ($request->filled('flight_type') && $request->input('flight_type') !== '0') {
|
||||
$where['flight_type'] = $request->input('flight_type');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user