-
Notifications
You must be signed in to change notification settings - Fork 479
Open
Description
I import and add item to the cart in my livewire class component like this
use Cart;
$item = Cart::add([
'id' => $this->product->id, // inique row ID
'name' => $this->product->name,
'price' => $validated['price'],
'quantity' => $validated['quantity'],
'attributes' => $validated['_attributes'],
'associatedModel' => Product::class
]);
However, getting the content of the cart like this Cart::getContent() returns empty
Darryldecode\Cart\CartCollection {#1572 ▼ // resources\views/products/index.blade.php
#items: []
#escapeWhenCastingToString: false
}
Metadata
Metadata
Assignees
Labels
No labels