Crinsane / LaravelShoppingcart

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

Creating an old cart #328

Open cerberus478 opened 7 years ago

cerberus478 commented 7 years ago

I would like to create an old cart when a user logs out so that when they sign in it's still there and then add any new products to the cart should they add anything else to it. The problem is that I flush the session so that removes the cart. I'm using laravel and I hope I made sense.

reed-jones commented 7 years ago

I'm just starting to use LaravelShoppingcart, but it sounds to me like you are looking for the Cart::store('username'); and Cart::restore('username'); methods? These will save/load the contents of the cart to the database.