From 2b45b9fd7002194cd019e5c70c184a87ed74e0b1 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Fri, 10 May 2019 16:24:34 -0500 Subject: [PATCH] Fix the searchable fields --- app/Repositories/FlightRepository.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Repositories/FlightRepository.php b/app/Repositories/FlightRepository.php index ab3481bb..9d6b2322 100644 --- a/app/Repositories/FlightRepository.php +++ b/app/Repositories/FlightRepository.php @@ -18,15 +18,16 @@ class FlightRepository extends Repository implements CacheableInterface protected $fieldSearchable = [ 'arr_airport_id', + 'distance', 'dpt_airport_id', 'flight_number' => 'like', - 'flight_code' => 'like', - 'flight_leg' => 'like', + 'route_code' => 'like', + 'route_leg' => 'like', 'route' => 'like', 'notes' => 'like', ]; - public function model() + public function model(): string { return Flight::class; } @@ -70,7 +71,7 @@ class FlightRepository extends Repository implements CacheableInterface * * @return $this */ - public function searchCriteria(Request $request, bool $only_active = true) + public function searchCriteria(Request $request, bool $only_active = true): self { $where = [];