Class 'App\Providers\Auth' not found

Updated at 26-Aug-2021, By samar

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.

  • Class 'App\Providers\Auth' not found

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

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

Back to code snippet queries related laravel