Crinsane / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
3.68k stars 1.73k forks source link

Using this Cart::add #70

Closed rahul7777yadav closed 9 years ago

rahul7777yadav commented 9 years ago

When we use Cart::add(array('id' => '293ad', 'name' => 'Product 1', 'qty' => 1, 'price' => 9.99, 'options' => array('size' => 'large'))); This type of error were found : production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Using $this when not in object context' in /opt/lampp/htdocs/laravel/vendor/gloudemans/shoppingcart/src/Gloudemans/Shoppingcart/Cart.php:128

Crinsane commented 9 years ago

Are you sure you're using the Cart Facade, and not calling the method statically on the Cart class?