mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update Cart.php
This commit is contained in:
@@ -751,7 +751,7 @@ class Cart
|
||||
*
|
||||
* @return \Gloudemans\Shoppingcart\CartItem
|
||||
*/
|
||||
private function createCartItem($id, string $name, $qty, $price, $weight, array $options) : CartItem
|
||||
private function createCartItem($id, ?string $name = null, $qty, $price, $weight, array $options) : CartItem
|
||||
{
|
||||
if ($id instanceof Buyable) {
|
||||
$cartItem = CartItem::fromBuyable($id, $qty ?: []);
|
||||
|
||||
Reference in New Issue
Block a user