diff --git a/src/Commands/MakeControllerCommand.php b/src/Commands/MakeControllerCommand.php index 3c78581..85e6947 100644 --- a/src/Commands/MakeControllerCommand.php +++ b/src/Commands/MakeControllerCommand.php @@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return '/' . strtoupper($matches[1]); }, ucfirst($name_str)); } - $path = "$name_str/" . ($upper ? 'Controller' : 'controller'); + $path = ($upper ? 'Controller' : 'controller') . "/$name_str"; $name = ucfirst(substr($name, $pos + 1)); $file = app_path() . "/$path/$name.php"; $namespace = str_replace('/', '\\', ($upper ? 'App/' : 'app/') . $path);