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

Virelox's avatar

Class 'Illuminate\Database\Migrations\Migrator' not found

Hello, if I try to create a controller, migration or anything via php artisan I get this error

  Class 'Illuminate\Database\Migrations\Migrator' not found

  at vendor/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php:80
    76|         // so the migrator can resolve any of these connections when it needs to.
    77|         $this->app->singleton('migrator', function ($app) {
    78|             $repository = $app['migration.repository'];
    79| 
  > 80|             return new Migrator($repository, $app['db'], $app['files'], $app['events']);
    81|         });
    82|     }
    83| 
    84|     /**

      +19 vendor frames 
  20  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
0 likes
4 replies
Sinnbeck's avatar

Try dumping autoload

composer dump-autoload
MichalOravec's avatar
Level 75

Remove whole vendor folder and then run

composer install
Virelox's avatar

I check files and Migrator.php is really deleted but i not did this, i copy this file from other project and worked, but your answer proably helped so i marked as best answer, thanks :)

Please or to participate in this conversation.