LaravelShoppingcart
LaravelShoppingcart copied to clipboard
Can't call static method error
Non-static method Gloudemans\Shoppingcart\Cart::add() should not be called statically
How to solve?
You will need to use the facade, you are try to add method statically. Just try add this.
use Cart;
the another way use Gloudemans\Shoppingcart\Facades\Cart;
https://laravel.com/docs/7.x/facades