mirkhamidov/yii2-gii

This package is abandoned and no longer maintained. The author suggests using the m1roff/yii2-gii package instead.

My useful extension of yii2-gii official module

Installs: 420

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

2.0.1 2022-09-08 17:42 UTC

This package is auto-updated.

Last update: 2022-09-08 17:43:58 UTC


README

Installation

The preferred way to install this extension is through composer.

Either run

composer require --dev m1roff/yii2-gii "^2.0"

Configure

add this lines to main-local.php config

if (!YII_ENV_TEST) {
    ...
    
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['*'],
        'generators' => [ //here
            'model' => [ // generator name
                'class' => 'm1roff\gii\generators\model\Generator', // generator class
                'templates' => [ //setting for out templates
                    'myModel' => '@m1roff/gii/generators/model/default', // template name => path to template
                ]
            ],
            'crud' => [ // generator name
                'class' => 'm1roff\gii\generators\crud\Generator', // generator class
                'templates' => [ //setting for out templates
                    'myCrud' => '@m1roff/gii/generators/crud/default', // template name => path to template
                ]
            ],
        ],
    ];
}