Skip to content

Return this cart item (when adding associate model). #300

@Augen2203

Description

@Augen2203

Hi I started trying to use your package in my application. Thanks.

I would like that when linking the model:

LaraCart::add($product-> id, $product->name,1, $product->price, $cart['options'])->setModel(Product::class);
the currently added item to the cart was returned to us, but this does not happen since setModel () returns null.

Why you need to do a similar design

$cart = LaraCart::add($product-> id, $product->name,1, $product->price, $cart['options'])->setModel(Product::class);
$cart->setModel(Product::class);

Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions