Skip to content
Marcin Halak (Versoo) edited this page Apr 10, 2018 · 4 revisions

Command: larapi:model

Command to create Model in resource directory, using for that a resource name.

php artisan larapi:model {Resource}

To create Model in exists resource you can use a name argument. It will be create Model for a resource with your custom name.

php artisan larapi:model {Resource} {Name}

Arguments:

  • Resource - Name of resource
  • Name - Optional: Name of model. If is empty it will be use resource as name of model.

Options:

  • -a, --all - Generate a migration, factory, and resource controller for the model
  • -m, --migration - Create a new migration file for the model.
  • -c, --controller - Create a new controller for the model
  • -f, --factory - Create a new factory for the model
  • --force - Create the class even if the model already exists.
Clone this wiki locally