From 76f6c699aa8f14b91fa8dacf16d5f977abda0274 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Sun, 18 Jun 2023 17:35:09 +0300 Subject: [PATCH] Fix the method, isEmpty, in the Cart model. --- app/Models/Cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Cart.php b/app/Models/Cart.php index b5ac2f1..af601ee 100644 --- a/app/Models/Cart.php +++ b/app/Models/Cart.php @@ -37,7 +37,7 @@ class Cart extends Model } public function isEmpty() { - return $this->items()->isEmpty(); + return count($this->items()->pluck('item_id')->toArray()); } public function setCity(City $city) {