I use Laravel 5.2 and I created database tables by running
php artisan make:migration create_categories_table --create=categories
and
php artisan make:migration create_posts_table --create=posts
and then I run php artisan migrate, and tables are created in database. But after I made some changes in migration file "create_posts_table.php" and run
php artisan migrate:rollback
I got an error:
[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
my create_posts_table.php is 
I tried composer update, composer dump-autoload but that hasn't fixed the problem.
Before you run a migration, you should run the following commands to make sure cache has been cleared:
php artisan clear-compiledphp artisan optimizeThis will make sure your new migration class has been registered correctly.
I was getting the same problem. May this helps somebody: run composer dump-autoload before running migrate:rollback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With