Home > Article > Backend Development > Laravel how to delete migrate migration files through command
Pass the command when creating migrate
<code>php artisan make:migration create_table_test</code>
The directory of the migration file will be added to the two files autoload_static.php
and autoload_classmap.php
.
Now every time I need to delete the migrate file of the above test table, in addition to deleting the migrate file itself, I also need to clear the directories where the migration files are added to the two files autoload_static.php
and autoload_classmap.php
.
Looking for the artisan command on the golaravel website, I did not find any information about automatically deleting migration files.
Question:
Is there any way to automatically delete migrate files through commands
Pass the command when creating migrate
<code>php artisan make:migration create_table_test</code>
The directory of the migration file will be added to the two files autoload_static.php
and autoload_classmap.php
.
Now every time I need to delete the migrate file of the above test table, in addition to deleting the migrate file itself, I also need to clear the directories where the migration files are added to the two files autoload_static.php
and autoload_classmap.php
.
Looking for the artisan command on the golaravel website, I did not find any information about automatically deleting migration files.
Question:
Is there any way to automatically delete migrate files through commands
Currently, laravel does not provide a command to automatically delete migration files;
But according to your question, you can delete the migration file and execute:
<code class="bash">composer dump-autoload</code>
Reset composer to automatically load files; saving you the trouble of manually deleting them!