migrate Run the database migrations
migrate:fresh Drop all tables and re-run all migrations
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
f you run php artisan make:model --help you can see all the available options
-m, --migration Create a new migration file for the model.
-c, --controller Create a new controller for the model.
-r, --resource Indicates if the generated controller should be a resource controller
Update
As mentioned in the comments by @arun in newer versions of laravel > 5.6 it is possible to run following command:
php artisan make:model Todo-a
You can make model + migration + controller, all in one line, using this command:
php artisan make:model --migration --controller test
Short version: php artisan make:model -mc test
Output :-
Model created successfully.
Created Migration:2018_03_10_002331_create_tests_table
Controller created successfully.
To Generate a migration, seeder, factory, and resource controller for the model
php artisan make:model Todo-a
Or
php artisan make:model Todo-all
Other Options
-c, --controller Create a new controller for the model
-f, --factory Create a new factory for the model
--force Create the class even if the model already exists
-m, --migration Create a new migration file for the model
-s, --seed Create a new seeder file for the model
-p, --pivot Indicates if the generated model should be a custom inte rmediate table model
-r, --resource Indicates if the generated controller should be a resour ce controller
0 Comments
CAN FEEDBACK
Emoji