Fix the searchable fields

This commit is contained in:
Nabeel Shahzad
2019-05-10 16:24:34 -05:00
parent 5b061ba636
commit 2b45b9fd70

View File

@@ -18,15 +18,16 @@ class FlightRepository extends Repository implements CacheableInterface
protected $fieldSearchable = [ protected $fieldSearchable = [
'arr_airport_id', 'arr_airport_id',
'distance',
'dpt_airport_id', 'dpt_airport_id',
'flight_number' => 'like', 'flight_number' => 'like',
'flight_code' => 'like', 'route_code' => 'like',
'flight_leg' => 'like', 'route_leg' => 'like',
'route' => 'like', 'route' => 'like',
'notes' => 'like', 'notes' => 'like',
]; ];
public function model() public function model(): string
{ {
return Flight::class; return Flight::class;
} }
@@ -70,7 +71,7 @@ class FlightRepository extends Repository implements CacheableInterface
* *
* @return $this * @return $this
*/ */
public function searchCriteria(Request $request, bool $only_active = true) public function searchCriteria(Request $request, bool $only_active = true): self
{ {
$where = []; $where = [];