laravelshoppingcart icon indicating copy to clipboard operation
laravelshoppingcart copied to clipboard

Session Cart doesn't work in an API. What do you recommend?

Open zheldibayev opened this issue 7 years ago • 2 comments
trafficstars

zheldibayev avatar Nov 01 '18 10:11 zheldibayev

Hello I recommend use the database based session.

darryldecode avatar Nov 03 '18 05:11 darryldecode

Hi, I tried using the database solution from your documentation and demo repo.

I got it working with the API, I am able to store and retrieve data correctly for each individual user.

However, I had a question, in the database the cart_data field stays the same for all users, but id is different for each user with _cart_items appended.

Does this mean that the actual deserialized data is stored elsewhere with the mapping of id, and cart_data field from the database?

sanjeetchand avatar Nov 06 '20 21:11 sanjeetchand