0

I've created a Laravel project in which I've run the following commands:

composer require laravel/ui

php artisan ui vue --auth

npm install

This sets up the controllers and a few other auth related files for the project. The second and third command are there to import vue into the project. Regardless, according to the Laravel docs, I've done what is needed to set up Auth for the project. To verify this, check out: https://laravel.com/docs/7.x/authentication

For some reason, after I serve up the app locally and try to either register a user or login a user, I get the following errors:

register: Illuminate\Contracts\Container\BindingResolutionException Target class [Auth\RegisterController] does not exist.

login: Illuminate\Contracts\Container\BindingResolutionException Target class [Auth\LoginController] does not exist.

Any thoughts? I can assure you that the class RegisterController.php does exist. Here's the photo example: enter image description here enter image description here

Ben
  • 117
  • 3
  • 10
  • Did you clear Laravel cache? And `composer dump-autoload -o` ? – Ron Sep 08 '20 at 23:44
  • well it should be `App\Http\Controllers\Auth\RegisterController` and `App\Http\Controllers\Auth\LoginController` ... `Auth::routes()` is in `web.php`? ... its almost like the auth routes were registered in a group that doesn't declare a namespace – lagbox Sep 09 '20 at 00:59
  • 1
    this would make me assume you are using Laravel 8, not Laravel 7; in Laravel 8 your routes are not in a group with a namespace defined by default (in a fresh install) – lagbox Sep 09 '20 at 07:56
  • 1
    https://stackoverflow.com/a/63807793/2109233 – lagbox Sep 09 '20 at 08:37
  • 1
    You're using Laravel 8, so make sure you're looking at [the documentation for Laravel 8](https://laravel.com/docs/8.x/authentication). Your question specifies you were looking at the docs for Laravel 7. – patricus Sep 10 '20 at 12:36

0 Answers0