2014-03-13 63 views

回答

19

複製ie。 crud生成器模板從gii/generators/crud/templates到您的應用程序app/templates/mycrud

然後在你的配置定義模板:

$config['modules']['gii'] = [ 
    'class'  => 'yii\gii\Module', 
    'generators' => [ 
     'crud' => [ 
      'class'  => 'yii\gii\generators\crud\Generator', 
      'templates' => ['mycrud' => '@app/templates/mycrud'] 
     ] 
    ] 
]; 

直到文檔完成後,您還可以看看我的Gii extension如何創建一個自定義生成和模板。

相關問題