From d5e968deaa3b3b23c8e9f279e290e31faeda0f04 Mon Sep 17 00:00:00 2001 From: sayliraut Date: Thu, 20 Jun 2024 14:55:50 +0530 Subject: [PATCH] changes --- app/Services/APIs/CustomerAPIs/RestaurantApiServices.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php b/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php index c20afdb..636238b 100644 --- a/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php +++ b/app/Services/APIs/CustomerAPIs/RestaurantApiServices.php @@ -191,7 +191,10 @@ class RestaurantApiServices $restaurantsQuery->where(function ($query) use ($searchData) { $query->where('name', 'like', "%$searchData%") ->orWhere('description', 'like', "%$searchData%") - ->orWhere('address', 'like', "%$searchData%"); + ->orWhere('address', 'like', "%$searchData%") + ->orWhereHas('state', function ($stateQuery) use ($searchData) { + $stateQuery->where('name', 'like', "%$searchData%"); + }); }); }