2019-02-14 07:03



I am using Nwidart in my laravel 5.6 application for modules system.

Outside module I can use this command:

php artisan make:model Product -mcr

This command create a model, resource controller, migration. But when I want a model inside a module product, this command is not working. I write this command:

php artisan module:make-model Product -mcr

This command is giving this error-

The "-c" option does not exist.

what can I do for solving the problem?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • douduan3203 douduan3203 2年前

    module:make-model is a custom command provided by the package you're using. This command does not support the -c or -r options. It only supports the -m option to generate the migration, and a --fillable option to specify the fillable fields.

    You can view the source of the command here.

    You'll need to run a separate command to generate the resource controller (module:make-controller).

    点赞 评论 复制链接分享
  • dongyou6909 dongyou6909 2年前

    Try -a that will create model,ResourceController,Migrations, and Faker Factory too.

    点赞 评论 复制链接分享