📜  yii2 模块命令未在控制台中显示 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:31.077000             🧑  作者: Mango

代码示例1
#Do this in bootstrap file of your module, you just have to register the consoleControllerNamespace

    public function bootstrap($app)
    {
        if ($app instanceof \yii\console\Application) {
            $app->getModule('test')->controllerNamespace = 'mymodules\test\console';
        }
    }