mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Update Cart.php
This commit is contained in:
@@ -366,7 +366,7 @@ class Cart
|
|||||||
public function priceTotal(): Money
|
public function priceTotal(): Money
|
||||||
{
|
{
|
||||||
return $this->getContent()->reduce(function (Money $initial, CartItem $cartItem) {
|
return $this->getContent()->reduce(function (Money $initial, CartItem $cartItem) {
|
||||||
return $initial->add($cartItem->priceTotal)
|
return $initial->add($cartItem->priceTotal);
|
||||||
}, new Money());
|
}, new Money());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user