In Laravel projects, due to testing, sometimes using php artisan make:migration create_xxx_table to create database migrations. If the created migration file database/migrations/2016_09_13_081736_create_xxx_table.php file is deleted, executing php artisan make:migration create_xxx_table will result in an error:
[ErrorException] include(/data/wwwroot//vendor/composer/../../database/migrations/2016_09_13_081736_create_xxx_table.php): failed to open stream: No such file or directory
Rerun composer update and you can execute the above command again.
After comparison, it was found that after executing the artisan command, the newly generated class and file mapping will be added to the two files: vendor/composer/autoload_classmap.php and vendor/composer/autoload_static.php. Because with this mapping, the artisan command does not generate a new file.
So deleting the lines with create_xxx_table in the above two files can solve this problem.
Or use artisan to create a new database migration, which will update the mapping of the composer class and file. It turns out that the mapping is gone, and then you will not report an error when you create the previous migration.
The above article solves the problem that Laravel cannot create migration is all the content I share with you. I hope it can give you a reference and I hope you can support me more.