Laravel how to delete migrate migration files through command

WBOY
Release: 2023-03-02 09:50:02
Original
2103 people have browsed it

Pass the command when creating migrate

<code>php artisan make:migration create_table_test</code>
Copy after login
Copy after login

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

Reply content:

Pass the command when creating migrate

<code>php artisan make:migration create_table_test</code>
Copy after login
Copy after login

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>
Copy after login

Reset composer to automatically load files; saving you the trouble of manually deleting them!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!