Laravel - PHP Fatal error: class 'CreateMatchesTable' not found in migrate: refresh

I recently cleaned up my tables locally, and this led to me deleting the Match table. Because of this, I get errors on the production server.

Locally, I ran php artisan migrate:reset , deleted the CreateMatchesTable file, and then php artisan migrate:refresh --seed . This worked locally, and then I pushed my last build to the server.

Now when I run php artisan migrate:refresh --seed on the php artisan migrate:refresh --seed server, I get the following error:

 PHP Fatal error: Class 'CreateMatchesTable' not found in /home/forge/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php on line 301 PHP Stack trace: {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException", "message":"Class 'CreateMatchesTable' not found","file":"\/home\/forge \/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Migrations\/ Migrator.php","line":301}} 

I read about other people experiencing this and I tried composer dump-autoload - but the problem still persists.

Also, php artisan dump-autoload , unfortunately, presents me this error:

 Generating optimized class loader Compiling common classes [ErrorException] Array to string conversion dump-autoload 

I deleted the site and flipped back migrations to Laravel Forge, and yet, when he pulled out the latest build in Forge, this error occurs!

+7
laravel laravel-4 composer-php artisan
source share
2 answers

You must remove the row from the migrations table in your database.

+14
source share

Solution for this

 composer dump-autoload 
+9
source share

All Articles