laravel-cart
laravel-cart copied to clipboard
Troubles with users
Hi, i am trying to implement a shopping cart and i have moltin installed but when i add a producto, it stored for every users, and its suppose to save it only for one user, what can i do? or what i am doing wrong? thanks for the help psd. sorry for my bad english
The laravel interface handles all carts using a unique identifier stored as a cookie, if you're testing solo chances are you've still got the same cookie from the first user. What you can do is either switch to using our session storage driver or create your own that would store these in your database with your user data.
so if i put it in a web server it will work, or how i destroy the cookie when the user logout?, i am using the auth::logout, where can i see the session storage driver?
Use Cart::destroy();