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

Read Also:  Send, Get data redirect route with parameters in laravel

‘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

Read Also:  JavaScript Capitalize first letter uppercase, lowercase and camel case

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 infinityknow.com 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.

Read Also:  Advanced jQuery Tips Tricks and Solutions

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  How to Send Email Using PHP scripts?
  2. Read Also:  how to open wordpress dashboard in localhost xampp?
  3. Read Also:  Monetized Videos not showing ads in youtube 2019 - Google Adsens
  4. Read Also:  PayPal Payment Gateway PHP Source Code
  5. Read Also:  URL Redirect in Laravel Tutorial
  6. Read Also:  How to store POST values for each form in an array?
  7. Read Also:  PHP cURL Http Authorization Pass Header Examples
  8. Read Also:  Check if the Uploaded File is an Image in Laravel 6
  9. Read Also:  Check if the Uploaded File is an Image in Laravel 6
  10. Read Also:  how to open wordpress dashboard in localhost xampp?