📅  最后修改于: 2022-03-11 14:54:31.077000             🧑  作者: Mango
#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';
}
}