Rashad Mirza logo
Create Laravel model, controller and migration in single command

Create Laravel model, controller and migration in single command

Rashad Mirza Nov 16, 2020
PHP Artisan gives us many opportunities.

We can create model by typing:
# php artisan make:model Post

Or create controller by typing:
# php artisan make:controller Post Controller

Or create migration by typing:
# php artisan make:migration create_posts_table

If you want keep it simple and do it by 1 single artisan command like Nescafe 3 in 1, then add "-mcr".
# php artisan make:model Post -mcr