diff --git a/src/Console/ControllerMakeCommand.php b/src/Console/ControllerMakeCommand.php index 60ef786..b084c59 100644 --- a/src/Console/ControllerMakeCommand.php +++ b/src/Console/ControllerMakeCommand.php @@ -45,7 +45,7 @@ protected function getStub() if ($this->option('api') && is_null($stub)) { $stub = config('stubs.path') . '/controller.api.stub'; } elseif ($this->option('api') && !is_null($stub) && !$this->option('invokable')) { - $stub = config('stubs.path') . str_replace('.stub', '.api.stub', $stub); + $stub = str_replace('.stub', '.api.stub', $stub); } $stub = $stub ?? config('stubs.path') . '/controller.plain.stub';