src/Leevel/Router/Console/Controller.php
public function handle(IRouter $router): void
    {
        // 处理命名空间路径
        $this->parseNamespace();

        // 设置模板路径
        $this->setTemplatePath(__DIR__.'/stub/controller');

        $controllerNamespace = $router->getControllerDir();
        $controllerName = ucfirst(camelize($this->argument('name')));

        $this->setCustomReplaceKeyValue('file_name', $controllerName);

        $this->setCustomReplaceKeyValue('controller_dir', $controllerNamespace);

        $this->setCustomReplaceKeyValue('action', $this->normalizeAction($this->argument('action')));

        // 保存路径
        $this->setSaveFilePath(
            $this->getNamespacePath().
            str_replace('\\', '/', $controllerNamespace).'/'.
            $controllerName.'.php'
        );

        // 设置类型
        $this->setMakeType('controller');

        // 执行
        $this->create();
    }
public function handle(IRouter $router): void
    {
        // 处理命名空间路径
        $this->parseNamespace();

        // 设置模板路径
        $this->setTemplatePath(__DIR__.'/stub/controller');

        $controllerNamespace = $router->getControllerDir();
        $controllerName = ucfirst(camelize($this->argument('name')));

        $this->setCustomReplaceKeyValue('file_name', $controllerName);

        $this->setCustomReplaceKeyValue('controller_dir', $controllerNamespace);

        $this->setCustomReplaceKeyValue('action', $this->normalizeAction($this->argument('action')));

        // 保存路径
        $this->setSaveFilePath(
            $this->getNamespacePath().
            str_replace('\\', '/', $controllerNamespace).'/'.
            $controllerName.'.php'
        );

        // 设置类型
        $this->setMakeType('controller');

        // 执行
        $this->create();
    }
响应命令.

@param \Leevel\Router\IRouter $router