Answer the question
In order to leave comments, you need to log in
Where can I find options for ControllerMakeCommand?
The laravel doc says that when creating a console command, you can specify additional options. For example
In turn
shows many options for the controller. If you go into the ControllerMakeCommand code (namespace Illuminate\Routing\Console;), there are no options there, as for all such classes. Where are they and how does Laravel understand who needs which options? protected $name = 'make:somethink --youroption=';
php artisan help make:controller
Answer the question
In order to leave comments, you need to log in
How is it not? Everything is:
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return [
['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a resource controller for the given model.'],
['resource', 'r', InputOption::VALUE_NONE, 'Generate a resource controller class.'],
['invokable', 'i', InputOption::VALUE_NONE, 'Generate a single method, invokable controller class.'],
['parent', 'p', InputOption::VALUE_OPTIONAL, 'Generate a nested resource controller class.'],
['api', null, InputOption::VALUE_NONE, 'Exclude the create and edit methods from the controller.'],
];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question