I have a problem to access Authenticate user in app service provider, here is my code. In cart Class (it's a custom class), I don't have access to current User. How can I access to Current user in custom Class?
public function register()
{
$this->app->singleton(Cart::class,function($app) {
return new Cart($app->auth->user());
});
}