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.

List of all Google Adsense, VueJS, AngularJS, PHP, Laravel Examples.

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

‘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

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.


Related FAQ

Here are some more FAQ related to this Article:

  1.   VueJS Convert Comma separated String To Array Example
  2.   PHP Image Resize Script Example
  3.   Insert Update Delete using PHP and mysql for Frontaccounting - crud
  4.   Simple Tooltip Component with CSS and Vuejs
  5.   Laravel 6.2 Get Last Inserted ID
  6.   Laravel 5.8 - Get Last Inserted ID With Example
  7.   Star Rating System using jQuery
  8.   PHP Autocomplete search with typeahead.js
  9.   Wordpress Advanced Search query custom fields
  10.   URL Redirect in Laravel Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *