Target class [App\Http\Controllers\Auth\Request] does not exist.

Updated at 03-Mar-2022, By samar

Target class [AppHttpControllersAuthRequest] does not exist.

With this article, we will examine several different instances of how to solve the "Target class [AppHttpControllersAuthRequest] does not exist.".

I have found the error Target class [App\Http\Controllers\Auth\Request] does not exist while visiting a URL in my Laravel app because I did not import the use Illuminate\Http\Request; in my controller file. You have to add the use Illuminate\Http\Request; after the namespace in your controller file to avoid this error.
  • Use Illuminate\Http\Request; in Laravel

    //Simply use below code snippet after the namespace to avoid the error.
    use Illuminate\Http\Request;
    

    Additional Notes :

    You can add use Illuminate\Http\Request; after the namespace in controller. Your controller namespace code will be look like this.

    <?php
    
    namespace App\Http\Controllers\Auth;

Back to code snippet queries related laravel