gii adminlte

安装次数: 11

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 0

分支: 0

开放问题: 0

类型:yii2-extension

v1.0 2018-08-28 07:08 UTC

This package is auto-updated.

Last update: 2024-09-21 20:56:35 UTC


README

yii2 gii adminlte

安装

composer require --prefer-dist kaykay012/gii 

或者,在根目录的composer.json文件中添加

"kaykay012/gii": "*"

然后执行

composer update

配置

配置修改

在文件 @app\config\main-local.php 中修改如下

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

if (YII_ENV_DEV) {
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            'model' => [
                'class' => 'kaykay012\gii\model\GeneratorCommon',
                'templates' => [
                    'adminlte' => '../../vendor/kaykay012/gii/model/adminlte',
                ]
            ],
            'crud' => [
                'class' => 'kaykay012\gii\crud\Generator',
                'templates' => [
                    'adminlte' => '../../vendor/kaykay012/gii/crud/adminlte',
                ]
            ],
        ]
    ];
}

return $config;