This commit is contained in:
sayliraut
2024-06-20 18:42:40 +05:30
parent 6982346e8e
commit 1ecc314e8e

View File

@@ -311,7 +311,7 @@ class RestaurantApiServices
}
public function searchRestaurant($customerIamId, $request)
public function searchRestaurant($customerIamId, $request)
{
try {
$restaurantsQuery = ManageRestaurant::with(['operatingHours', 'state'])
@@ -334,6 +334,9 @@ class RestaurantApiServices
foreach ($restaurants as &$res) {
$res['image'] = ListingImageUrl('restaurant_images', $res['image']);
$res['is_favourite'] = CustomerFavouriteRestaurant::where('principal_xid', $customerIamId)
->where('restaurant_xid', $res->id)
->exists();
}
return jsonResponseWithSuccessMessageApi(__('auth.restaurant_search'), $restaurants, 200);