帕斯奇尼/yii2-gii

为 Yii 框架定制的 Gii 扩展

维护者

详细信息

github.com/pascini/yii2-gii

源码

安装: 5

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 1

类型:yii2-extension

v1.2.0 2021-11-18 22:56 UTC

This package is auto-updated.

Last update: 2024-09-19 04:47:50 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',
                ],
            ],
        ]
    ];
}