How to use custom templates in gii (using Yii 2)
问题 I'm trying to find a way to use custom Gii templates for Yii 2, but looking at the missing documentation in the docs, I assume it's not possible yet? Or am I missing something? 回答1: Copy ie. the crud generator templates from gii/generators/crud/templates to your application app/templates/mycrud . Then define the templates in your config: $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', 'generators' => [ 'crud' => [ 'class' => 'yii\gii\generators\crud\Generator', 'templates' => [