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

VETO87's avatar

all php artisan commands doesn't work

Hello, I was working in a project but I had to do some other personal work when I get back to my project after 5 days I got this error. all the commands won't work such as php artisan serve and php artisan. This is Laravel 8 project.

   ErrorException

  require(C:\Users\Snoke\Documents\laravel\rating\routes/console.php): Failed to open stream: No such file or directory


  at C:\Users\Snoke\Documents\laravel\rating\app\Console\Kernel.php:30
     26▕     protected function commands()
     27▕     {
     28▕         $this->load(__DIR__.'/Commands');
  ➜  30▕         require base_path('routes/console.php');
     31▕     }
     32▕ }
     33▕

  1   C:\Users\Snoke\Documents\laravel\rating\app\Console\Kernel.php:30
      require()

  2   C:\Users\Snoke\Documents\laravel\rating\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:316
      App\Console\Kernel::commands()
0 likes
6 replies
tykus's avatar

Is there a routes/console.php file at all?

VETO87's avatar

@tykus No I didn't find one. I didn't change any files before I leave for my personal work.

tykus's avatar

@VETO87 well, it's gone, and I didn't delete it!

If you just create an empty PHP file routes/console.php:

<?php
//

You should be good

Please or to participate in this conversation.