raphaelbsr/yii2-gii

为 Yii 框架定制的 Gii 扩展

安装: 73

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 1

开放问题: 0

类型:yii2-extension

v1.0.2 2018-11-09 18:27 UTC

This package is auto-updated.

Last update: 2024-09-10 07:40:56 UTC


README

用于 AJAX 使用的定制 Yii2 Crud 生成器

安装

安装此扩展的首选方法是使用 composer

运行以下命令之一:

php composer.phar require raphaelbsr/yii2-gii "~1.0"

或者在您的 composer.json 文件的 require 部分添加:

"raphaelbsr/yii2-gii": "~1.0"

使用方法

安装扩展后,只需按以下方式修改您的应用程序配置

...
if (!YII_ENV_TEST) {
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            'crud' => [
                'class' => 'yii\gii\generators\crud\Generator',
                'templates' => [
                    'Raphaelbsr Crud' => '@vendor/raphaelbsr/yii2-gii/crud/default',
                ],
            ],
        ]
    ];
}