Fix Cart.getItem() method.

This commit is contained in:
2023-06-19 20:31:02 +03:00
parent fd4a4bf5ea
commit 7636ae4715
+3 -4
View File
@@ -50,11 +50,10 @@ class Cart extends Model
{ {
$itemsIds = $this->getItemIds(); $itemsIds = $this->getItemIds();
$itemId = Item::whereIn('id', $itemsIds) $item = Item::whereIn('id', $itemsIds)
->where('uuid', $name) ->where('name', $name)->first();
->count();
return Item::where('id', $itemId)->first(); return $item;
} }
public function getItemIds(): array public function getItemIds(): array