'Haska\Cart\CartServiceProvider',
'Cart' => 'Haska\Cart\Facade',
php artisan config:publish haska:laravel-cart
// Format array of required info for item to be added to cart...
$items = array(
'id' => 1,
'name' => 'Product name',
'price' => 120.00,
'quantity' => 1
);
// Make the insert...
Cart::insert($items);
Cart::insert(array(
'id' => 'foo',
'name' => 'bar',
'price' => 100,
'quantity' => 1,
'tax' => 20
));
foreach (Cart::contents() as $item) {
$item->name = 'Foo';
$item->quantity = 1;
}
foreach (Cart::contents() as $item) {
$item->remove();
}
if ($item->hasOptions()) {
// We have options
}