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

后端 未结 14 977
一整个雨季
一整个雨季 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:38

    php artisan make:model PurchaseRequest -crm
    

    The Result is

    Model created successfully.
    Created Migration: 2018_11_11_011541_create_purchase_requests_table
    Controller created successfully.
    

    Just use -crm instead of -mcr

提交回复
热议问题