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

hashirqazi's avatar

php artisan route:list not working in laravel 8

I am facing this error when I try to execute the above command php artisan route:list here is the result ErrorException

include(C:\xampp\htdocs\blog\vendor\composer/../../app/Http/Controllers/PagesController.php): failed to open stream: No such file or directory

at C:\xampp\htdocs\blog\vendor\composer\ClassLoader.php:444 440▕ * Prevents access to $this/self from included files. 441▕ */ 442▕ function includeFile($file) 443▕ { ➜ 444▕ include $file; 445▕ } 446▕

1 C:\xampp\htdocs\blog\vendor\composer\ClassLoader.php:444 include()

2 C:\xampp\htdocs\blog\vendor\composer\ClassLoader.php:322 Composer\Autoload\includeFile("C:\xampp\htdocs\blog\vendor\composer/../../app/Http/Controllers/PagesController.php")

0 likes
10 replies
Sergiu17's avatar

Do you have PagesController class? is there any route that points to PagesController class?

laracoft's avatar

@hashirqazi

Does the file C:\xampp\htdocs\blog\vendor\composer/../../app/Http/Controllers/PagesController.php exists?

MichalOravec's avatar

Make sure that PagesController exists and then run

composer dump-autoload
hashirqazi's avatar

I was dealing with PostsController but today it's giving toady now different error

laracoft's avatar

@hashirqazi

Keep things simple, 1 issue 1 discussion.

So how was the PagesController issue solved?

hashirqazi's avatar

I apologize for disturbance. I wrote Route::resource( "App\Http\Controllers\PostsController" ) and then run php artisan route:list

Please or to participate in this conversation.