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

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

    Just Try this command on your terminal

    php artisan make:model Todo -mcr
    

    Below the output and your Model, Controller with Resource and Migration file will create...

    Model created successfully.
    Created Migration: 2019_12_25_105305_create_todos_table
    Controller created successfully.
    

提交回复
热议问题