php artisan make:model -mcr Task
Model created successfully. Created Migration: 2018_08_16_082225_create_tasks_table Controller created successfully.
You will get all file in one command.
Model created successfully. Created Migration: 2018_08_16_082225_create_tasks_table Controller created successfully.
You will get all file in one command.
The below Command will create the model, Controller, Factory, migration and Seeder.
php artisan make:model ModelName -a
-a stands for all (Model, controller, factory, Migration and Seeder)
Note: The above command will work successfully in Laravel 5.5 or > versions
You can use this command for create model and controller and migration at same time:( You can use --migration
Instead of -m
and you can use --controller
Instead of -c
)
php artisan make:model MODEL_NAME -c -m
or you can use for create model , controller ,migration and factory at same time ( Youc can use --all
Instead of -a
):
php artisan make:model MODEL_NAME -a
you can make model + migration + controller, all in one line, reference this link
Laravel 5.4 create model, controller and migration in single artisan command