Add callsign to flight search (#1341)

Make callsign searchable

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
This commit is contained in:
B.Fatih KOZ
2021-11-02 09:00:29 -04:00
committed by GitHub
co-authored by Nabeel S
parent f498ad3bba
commit 9956929df7
+5
View File
@@ -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');
}