加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Laravel 5.2 php artisan migrate:回滚错误

发布时间:2020-12-14 19:36:18 所属栏目:大数据 来源:网络整理
导读:我使用Laravel 5.2并通过运行创建了数据库表 php artisan make:migration create_categories_table --create=categories 和 php artisan make:migration create_posts_table --create=posts 然后我运行php artisan migrate,并在数据库中创建表.但是在我对迁
我使用Laravel 5.2并通过运行创建了数据库表

php artisan make:migration create_categories_table --create=categories

php artisan make:migration create_posts_table --create=posts

然后我运行php artisan migrate,并在数据库中创建表.但是在我对迁移文件“create_posts_table.php”进行了一些更改并运行之后

php artisan migrate:rollback

我收到一个错误:

[SymfonyComponentDebugExceptionFatalErrorException]
Class ‘CreatePostsTable’ not found
PHP Fatal error: Class ‘CreatePostsTable’ not found in E:programfilesxampphtdocsdenemevendorlaravelframeworksrcIlluminateDatabaseMigrationsMigrator.php on line 336

我的create_posts_table.php是

enter image description here

我尝试过composer update,composer dump-autoload但是还没有解决问题.

解决方法

我遇到了同样的问题.这可以帮助某人:在运行migrate:rollback之前运行composer dump-autoload.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读