I have been created a module in Laravel 5.8 by using the following command.
php artisan module:make leave
A leave module structure is created. But how can I create a CRUD operation in this module by using the infyom (or another) CRUD generator?
I have been created a module in Laravel 5.8 by using the following command.
php artisan module:make leave
A leave module structure is created. But how can I create a CRUD operation in this module by using the infyom (or another) CRUD generator?
If you are trying to make a model
instead of a module
you can run
php artisan make:model MyModel -a
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return [
['all', 'a', InputOption::VALUE_NONE, 'Generate a migration, factory, and resource controller for the model'],
['controller', 'c', InputOption::VALUE_NONE, 'Create a new controller for the model'],
['factory', 'f', InputOption::VALUE_NONE, 'Create a new factory for the model'],
['force', null, InputOption::VALUE_NONE, 'Create the class even if the model already exists'],
['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model'],
['pivot', 'p', InputOption::VALUE_NONE, 'Indicates if the generated model should be a custom intermediate table model'],
['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
];
}