From 8850d43575fed9a41d5c88d4ec037ba9660b54c1 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Mon, 19 Jun 2023 22:09:16 +0300 Subject: [PATCH] Fix the addItemIds method in 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 ac0f885..ed02efa 100644 --- a/app/Models/Cart.php +++ b/app/Models/Cart.php @@ -115,7 +115,7 @@ class Cart extends Model public function addItemIds(array $item_ids) { $itemIDs = array_merge($this->getItemIds(), $item_ids); - $this->companies()->sync($itemIDs); + $this->items()->sync($itemIDs); } public function removeItemId(int $item_id)