Crinsane / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
3.67k stars 1.73k forks source link

Can't call static method error #620

Open CodeAntho opened 4 years ago

CodeAntho commented 4 years ago

Non-static method Gloudemans\Shoppingcart\Cart::add() should not be called statically How to solve?

ishifoev commented 4 years ago

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;

bumbummen99 commented 4 years ago

https://laravel.com/docs/7.x/facades