Tips of multiple file creation
Creating all files at a time using commands
Till now we created Controller, model and migration files all are in individual. You can also create all at a time for your project.
Ex: if you take the help of PHP artisan commands like
php artisan help make:model
Creating multiple files using commands Laravel
if you notice that we have options in image
if you notice that we have options in image
-a -all will create all files Controller, Model, Migration
For suppose you need to build new module for "Products". In this case you can simply run the command like
php artisan make:model Products -mc
This "m" will create the migration file and "c" will create the controller for Products.
In this single command we are created model, controller and migration file.
Comments
Post a Comment
Thank you :)