Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hrawat0308's avatar

Error when run php artisan route:list

when i run php artisan route:list, i received an error i.e

Illuminate\Contracts\Container\BindingResolutionException Target class [Auth\LoginController] does not exist. at C:\wamp64\www\laravel6\vendor\laravel\framework\src\Illuminate\Container\Container.php:811 807▕ 808▕ try { 809▕ $reflector = new ReflectionClass($concrete); 810▕ } catch (ReflectionException $e) { ➜ 811▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 812▕ } 813▕ 814▕ // If the type is not instantiable, the developer is attempting to resolve 815▕ // an abstract type such as an Interface or Abstract Class and there is

1 [internal]:0

2 C:\wamp64\www\laravel6\vendor\laravel\framework\src\Illuminate\Container\Container.php:809 ReflectionException::("Class Auth\LoginController does not exist")

I've just installed laravel latest version and have not done any changes in the code. Even the login and register gives me an error i.e Target class [Auth\RegisterController] does not exist. and Target class [Auth\LoginController] does not exist.

The commands i ran after laravel install were: 1)composer require laravel/ui --dev 2)php artisan ui vue --auth 3) npm install && npm run dev 4) php artisan route:list

0 likes
4 replies
hiajayy's avatar

To install basic auth scaffolding first use composer require laravel/jetstream then php artisan jetstream:install livewire or php artisan jetstream:install inertia

1 like
rjvds's avatar

I just came across the same error. According to the documentation you have to define the controller class in your route file. This will solve it.

use App\Http\Controllers\UserController;

Route::get('/user', [UserController::class, 'index']);

https://laravel.com/docs/8.x/routing#basic-routing

Frotter's avatar

Greetings from Brazil, It doesn´t work for me, what can I do besides that? and where I past this code? I have 3 parts: web.php where the Route calls for page post, in the postsController.php it do reference to function index and I have post.php that I didn´t understand what is it function, cause I´m a very beginner in Laravel

Please or to participate in this conversation.