moltin / laravel-cart

Laravel Facade and Service Provider for Moltin\Cart
276 stars 87 forks source link

Cart::destroy(); doesn't work. #61

Open berpcor opened 8 years ago

berpcor commented 8 years ago

Laravel 5.1 Cart::destroy does not destroy cart. Interesting thing. It doesn't work at all in Google Chrome. In Mozilla Firefox it works strange. Cart::destroy(); dd(Cart::totalItems()); gives me 0, but right after that I comment a string

//Cart::destroy();
dd(Cart::totalItems());

and it shows me an old number of items. It happens until I clear everything in browser (local storage, cookies, session, ...).

So many people uses your package. Are you still maintain it or not??!

I wrote a big bunch of code and now it seems that package does not work with Laravel 5.1.

mmhfavour commented 4 years ago

you need to return a view page after destroying the Cart..,

if your code goes to payment gateway after Cart::destroy; it will not be destroying cart.

A workaround is that; after you get response from payment gateway, try Cart::destroy.. It should work..,