Closed shirshak55 closed 5 years ago
By default card is saved with "default" prefix.
Cart::currentInstance(); // default
Cart::instance($user->id)->currentInstance(); // will return user id
Yeah, this package doesn't depend on session or anything like that.
@melihovv lets say there are 10 users each having cart. by logic Cart::currentInstance(); which is default should all be different for different user right? I just wanted to know how are they stored in redis. Are they based on userid or what .
It is stored per what you pass to store() method.
Cart::store()
Persist current shopping cart instance to storage.
Cart::store($user->id);
Cart::instance('cart')->store($user->id);
Cart::instance('wishlist')->store($user->id);
I wonder who cart is saved . Is it per user ?
Cart::getTotal() gets total from which cart because we know there can be 100 users each having a cart?
Plz let me know if it is stateless i would like to read code too :)
by stateless i mean just using rest api without session