Laravel 5.4 create model, controller and migration in single artisan command

后端 未结 14 981
一整个雨季
一整个雨季 2020-12-22 14:35

I can create a model and resource controller (binded to model) with the following command

php artisan make:controller TodoController --resource --model=Todo
         


        
14条回答
  •  清酒与你
    2020-12-22 15:34

    You can do it with the following command:

    php artisan make:model post -mcr
    

    Brief :

    -m, to create migration

    -c to create controller

    -r to specify the controller has resource

提交回复
热议问题