复制ie.从gii / generators / crud / templates到应用程序app / templates / mycrud的crud生成器模板.
然后在您的配置中定义模板:
$config['modules']['gii'] = [ 'class' => 'yii\gii\Module','generators' => [ 'crud' => [ 'class' => 'yii\gii\generators\crud\Generator','templates' => ['mycrud' => '@app/templates/mycrud'] ] ] ];
在文档完成之前,您还可以看看我的Gii extension如何创建自定义生成器和模板.