Open Doremidon opened 7 years ago
Isn't it Instances what you are looking for (multiple carts):
https://github.com/darryldecode/laravelshoppingcart#instances
@frezno I do it in same way. Where I'm make a mistake?
Please make sure your session key is unique :)
How can i solve this?
Hello.
And before I have problem with session. I change file "/vendor/darryldecode/cart/src/Darryldecode/Cart/Cart.php"
After refresh page without this line Cart was clear.
I want to use 2 cart in same time. Laravel 5.4
In file "/app/Providers/AppServiceProvider.php" I'm write: class AppServiceProvider extends ServiceProvider { public function register() { $this->app->singleton('cart_main', function($app) {
} }
In code I use $cart_main = app('cart_main'); $cart_banquet = app('cart_banquet');
In fact this is same Cart. All changes in one cart app('cart_main') reflected on another cart app('cart_banquet').
Can you help me to divide it?