Fix Cart.getItem() method.

main
KKlochko 2 years ago
parent fd4a4bf5ea
commit 7636ae4715

@ -50,11 +50,10 @@ class Cart extends Model
{
$itemsIds = $this->getItemIds();
$itemId = Item::whereIn('id', $itemsIds)
->where('uuid', $name)
->count();
$item = Item::whereIn('id', $itemsIds)
->where('name', $name)->first();
return Item::where('id', $itemId)->first();
return $item;
}
public function getItemIds(): array

Loading…
Cancel
Save