LaravelShoppingcart icon indicating copy to clipboard operation
LaravelShoppingcart copied to clipboard

Can't call static method error

Open CodeAntho opened this issue 4 years ago • 2 comments

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

CodeAntho avatar Jun 02 '20 06:06 CodeAntho

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;

ishifoev avatar Jun 02 '20 06:06 ishifoev

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

bumbummen99 avatar Jun 02 '20 10:06 bumbummen99