mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Update CartItem.php
This commit is contained in:
@@ -228,7 +228,7 @@ class CartItem implements Arrayable, Jsonable
|
|||||||
*/
|
*/
|
||||||
public static function fromBuyable(Buyable $item, int $qty = 1, ?CartItemOptions $options = null) : self
|
public static function fromBuyable(Buyable $item, int $qty = 1, ?CartItemOptions $options = null) : self
|
||||||
{
|
{
|
||||||
$options = $options ?: new CartItemOptions([])
|
$options = $options ?: new CartItemOptions([]);
|
||||||
return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $qty, $item->getBuyableWeight($options), $options);
|
return new self($item->getBuyableIdentifier($options), $item->getBuyableDescription($options), $item->getBuyablePrice($options), $qty, $item->getBuyableWeight($options), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user