How to fix Class ‘App\Http\Controllers\Auth’ not found

in Class ‘App\Http\Controllers\Auth’ not found Resolve Error for Go to YourCustomController after that add use Auth; at the top on the Controller Page.

Display Error: Class ‘App\Http\Controllers\Auth’ not found -FatalErrorException in LoginController.php

FatalErrorException in LoginController.php line 52: Class ‘App\Http\Controllers\Admin\Auth\Auth’ not found in LoginController.php line 52

Solution for “Class ‘App\Http\Controllers\Auth’ not found”

use Auth; 
// Illuminate\Support\Facades\Auth

//or try it

use Illuminate\Support\Facades\Auth;

Also Read: Html Form Class Not Found In Laravel

Also Read This 👉   PHP check laravel version using command

‘App\Http\Controllers\Auth\Auth’ not found in Laravel 5.6

step 1: first of all go to Illuminate\Foundation\Exceptions\Handler.php class
step 2: here find unauthenticated method
step 3: and then last update it with source code below

protected function unauthenticated($request, AuthenticationException $exception)
    return $request->expectsJson()
                ? response()->json(['message' => $exception->getMessage()], 401)
                : redirect('/');

The proper namespace is Illuminate\Support\Facades\Auth;

also you can Add use Illuminate\Support\Facades\Auth; at the top part of your controller class in Laravel. also you can read my prev post like as class ‘collective\html\htmlserviceprovider’ not found

Also Read This 👉   How to Print Arrays in PHP?

You must use the Auth facade. Add this line to top part of your Laravel controller: resolve this error : Class ‘App\Http\Controllers\Auth’ not found

I hope you get an idea about class ‘auth’ not found.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.