Class 'App\Providers\Auth' not found

Sometimes we get an error Class 'App\Providers\Auth' is not found because we did not import the Auth in our class. In my case I have forgotten to import the Auth facade in my AppServiceProvider class in laravel project.

Answers 1
  • Class 'App\Providers\Auth' not found

    //app\Providers\AppServiceProvider.php
    use Auth;
    class AppServiceProvider extends ServiceProvider
    {
    
    0

    Import Auth facade in AppServiceProvider class. Class may be different in providers directory.

  • Back to code snippet queries related laravel