my country using 0.18 tax. but laravelshopping cart used presumably 0.21. i need to change tax value but there are not config file.
thanx for reply.
You can write php artisan vendor:publish.
You will find cart.php file into config folder
I have the same issue as kvlknctk but when ir run "php artisan vendor:publish" i get
[ErrorException]
The use statement with non-compound name 'Cart' has no effect
@kvlknctk you have a /vendor/gloudemans/shoppingcart/src folder, inside of it is there a "cart.php" where you can change tax value and many oders things!
We don't change values under vendor folder. If you update your package all values will be reset.
so what i have to do?
php artisan vendor:publish should have worked. I am already using it and vendor:publish worked.
What is your Laravel version, by the way?
I'm gettin this error...

Even when i do php artisan migrate
Did you setup Cart alias into config/app.php?
Maybe Cart class not found.
Yes
'Cart' => Gloudemans\Shoppingcart\Facades\Cart::class,
Maybe i should change for ?
'Cart' => Gloudemans\Shoppingcart\Src\Facades\Cart::class
Well, it seems you did great 馃憤
'Cart' => Gloudemans\Shoppingcart\Facades\Cart::class,
Look, when I wrote vendor:publish.

Look, if i search for Cart.php this is what i found.

Maybe i am including the alias with a wrong path?
No, Src is a folder path, but your class has NAMESPACE namespace Gloudemans\Shoppingcart\Facades so you have to call class by Namespace not folder source.
OK i did it,

i was adding "use Cart;" in a Controller, i don't know why, maybe I pasted there accidentally! Thanks!
Good, you have figured it out 馃憤
Can you help me with this? https://github.com/Crinsane/LaravelShoppingcart/issues/229
I want the admin user to be able to change the sales tax. This is what I added cart.php config:
'tax' => \DB::table('business_info')->select('sales_tax')->first(),
When refreshing the page to test it I get an error:
Class 'DB' not found
Is there a better route to take in handling this type of function?
You can't access the db in the configuration. I guess right now you best option is to set the config in you AppServiceProvider or something at runtime with Config::set()
Thank you.
'tax' => \Illuminate\Support\Facades\DB::table('products')->value('tax'),
is there any way that the tax value will be dynamic? I mean for different product tax value will be counted from respective product tax column.
You can write
php artisan vendor:publish.
You will findcart.phpfile intoconfigfolder
Thanks bhai jan
Most helpful comment
You can write
php artisan vendor:publish.You will find
cart.phpfile intoconfigfolder