raphaelbsr/yii2-gii

Custom Gii extension for the Yii framework

Installs: 72

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

Type:yii2-extension

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

This package is auto-updated.

Last update: 2024-05-10 06:59:11 UTC


README

Customized Yii2 Crud Generator for ajax use

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Usage

Once the extension is installed, simply modify your application configuration as follows:

...
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',
                ],
            ],
        ]
    ];
}