<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'vq0oj6phGGcY21gUXT7gSsU1Ph5GGVyG',
        ],
    ],
];

if (!YII_ENV_TEST && YII_DEBUG) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [ //在这里加入配置
            'controller' => [ //生成器名称
                'class' => 'yii\gii\generators\controller\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcController' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\controller' //模板名称 => 模板路径
                ],
            ],
            'crud' => [ //生成器名称
                'class' => 'yii\gii\generators\crud\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcCrud' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\crud' //模板名称 => 模板路径
                ],
            ],
            'module' => [ //生成器名称
                'class' => 'yii\gii\generators\module\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcModule' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\module' //模板名称 => 模板路径
                ],
            ],
            'extension' => [ //生成器名称
                'class' => 'yii\gii\generators\extension\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcExtension' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\extension' //模板名称 => 模板路径
                ],
            ],
            'form' => [ //生成器名称
                'class' => 'yii\gii\generators\form\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcForm' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\form' //模板名称 => 模板路径
                ],
            ],
            'model' => [ //生成器名称
                'class' => 'yii\gii\generators\model\Generator', //生成器类名
                'templates' => [ //setting for out templates
                    'qcModel' => '@app/../vendor\yiisoft\yii2-gii\qcTemplate\model' //模板名称 => 模板路径
                ],
            ],
        ],
    ];
}

return $config;
