gii adminlte

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:yii2-extension

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

This package is auto-updated.

Last update: 2024-05-21 20:08:47 UTC


README

yii2 gii adminlte

安装

composer require --prefer-dist kaykay012/gii 

or 在根目录的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;