From d1a676b40929e406a4275ecbc3cf8127d6f1c559 Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Thu, 19 Aug 2021 18:05:59 +0300 Subject: [PATCH] #4452 [evdepismis-theme] Create theme --- .../src/Http/Controller/AjaxController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/default/visiosoft/location-module/src/Http/Controller/AjaxController.php b/addons/default/visiosoft/location-module/src/Http/Controller/AjaxController.php index 0d804293c..99bcc22a7 100644 --- a/addons/default/visiosoft/location-module/src/Http/Controller/AjaxController.php +++ b/addons/default/visiosoft/location-module/src/Http/Controller/AjaxController.php @@ -51,6 +51,12 @@ class AjaxController extends PublicController $id = explode(',', $this->request->id); $query = $this->cityRepository->getModel()->whereIn('parent_country_id', $id); + if ($this->request->search) { + $query->where('name', 'like', '%' . $this->request->search . '%'); + } + + $query->get(); + return $this->queryOrder($query, $this->cityRepository); } } @@ -154,4 +160,4 @@ class AjaxController extends PublicController } } -} \ No newline at end of file +}