Closed hakimihamdan88 closed 8 years ago
I think you have to register a new service provider (https://github.com/darryldecode/laravelshoppingcart#instances) and get the instance from Laravel DI container (http://laravel.com/docs/5.1/container#resolving), This facade always return default instance named 'cart'. @darryldecode correct me if I'm wrong.
@SimoTod, yes you are right. When you add a new instance by following here (https://github.com/darryldecode/laravelshoppingcart#instances).. Eg. you added new "wishlist" instance of a cart.. you will need to this like so:
$WishlistCart = app('wishlist');
WishlistCart::add(455, 'Sample Item', 100.99, 2, array());
and so on..
@darryldecode possible without using service provider? exacty like https://github.com/Crinsane/LaravelShoppingcart#instances
It's better to save the instance name in DB and get it with ->instance('instance_name')
rather than create a provider for each instance. Any plan to do that?
Possible to have instance like this?