mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Update Cart.php
This commit is contained in:
@@ -751,7 +751,7 @@ class Cart
|
|||||||
*
|
*
|
||||||
* @return \Gloudemans\Shoppingcart\CartItem
|
* @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) {
|
if ($id instanceof Buyable) {
|
||||||
$cartItem = CartItem::fromBuyable($id, $qty ?: []);
|
$cartItem = CartItem::fromBuyable($id, $qty ?: []);
|
||||||
|
|||||||
Reference in New Issue
Block a user