Skip to content

Commit

Permalink
Replaced "action" flag with "invokable"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Sakovich committed Jul 14, 2018
1 parent b66d24c commit 87e8857
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Routing/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ protected function getStub()
$stub = '/stubs/controller.nested.stub';
} elseif ($this->option('model')) {
$stub = '/stubs/controller.model.stub';
} elseif ($this->option('action')) {
$stub = '/stubs/controller.action.stub';
} elseif ($this->option('invokable')) {
$stub = '/stubs/controller.invokable.stub';
} elseif ($this->option('resource')) {
$stub = '/stubs/controller.stub';
}

if ($this->option('api') && is_null($stub)) {
$stub = '/stubs/controller.api.stub';
} elseif ($this->option('api') && ! is_null($stub) && ! $this->option('action')) {
} elseif ($this->option('api') && ! is_null($stub) && ! $this->option('invokable')) {
$stub = str_replace('.stub', '.api.stub', $stub);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ protected function getOptions()

['resource', 'r', InputOption::VALUE_NONE, 'Generate a resource controller class.'],

['action', null, InputOption::VALUE_NONE, 'Generate a single action controller class.'],
['invokable', 'i', InputOption::VALUE_NONE, 'Generate a single action controller class.'],

['parent', 'p', InputOption::VALUE_OPTIONAL, 'Generate a nested resource controller class.'],

Expand Down

0 comments on commit 87e8857

Please sign in to comment.