From ad136b17719a0481a731944c42b8187581b9062e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=87ak=C4=B1rel?= Date: Fri, 9 Nov 2018 12:39:37 +0300 Subject: [PATCH] Duplicate Stub Path Unnecessary getting stub path from config --- src/Console/ControllerMakeCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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';