Laravel 5.2 php artisan migrate:回滚错误

前端之家收集整理的这篇文章主要介绍了Laravel 5.2 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

我收到一个错误

[Symfony\Component\Debug\Exception\FatalErrorException]
Class ‘CreatePostsTable’ not found
PHP Fatal error: Class ‘CreatePostsTable’ not found in E:\programfiles\xampp\htdocs\deneme\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.PHP on line 336

我的create_posts_table.PHP

enter image description here

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

解决方法

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

猜你在找的Laravel相关文章