我在使用laravel-shopping-cart的时候按照https://github.com/overtrue/laravel-shopping-cart
的步骤来操作
我用
$items = Cart::all();
dd($items);
直接报错,
Non-static method Overtrue\LaravelShoppingCart\Cart::all() should not be called statically, assuming $this from incompatible context
然后我改成
$items = (new Cart)->all();
dd($items);
后,又报这个错误
Argument 1 passed to Overtrue\LaravelShoppingCart\Cart::__construct() must be an instance of Illuminate\Session\SessionManager, none given,
大家看是什么问题啊?