编程语言
首页 > 编程语言> > 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.

标签:php,laravel-5,laravel-5-2,laravel-migrations
来源: https://codeday.me/bug/20190714/1458626.html