在我的应用程序中,当我运行php artisan migrate:make create_location_user_table
时,删除生成的文件(如果删除vendor/composer/autoload_classmap.php
中创建的行,则无关紧要,php artisan migrate:refresh
命令会抛出错误:
include(<path_to_project>/database/migrations/2015_06_21_105357_create_location_user_table.php): failed to open stream: No such file or directory
运行命令以摆脱错误的自动加载条目后,我得到一个例外。我尝试过的命令是:composer update
,composer dump-autoload
,php artisan clear-compiled
,php artisan optimize
。
PHP Fatal error: Class 'CreateLocationUserTable' not found in <path_to_project>\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php on line 323
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'CreateLocationUserTable' not found
答案 0 :(得分:2)
手动进入mysql数据库(PHPMyAdmin)并删除迁移表。通过上面的步骤,这样做可以解决您的问题