cadyrov/yii2-gii

yii2-gii alternative

v1.0.21 2020-03-27 21:16 UTC

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist cadyrov/yii2-gii "*"

or add

"cadyrov/yii2-gii": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your web.php like this

$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    // uncomment the following to add your IP if you are not connecting from localhost.
    //'allowedIPs' => ['127.0.0.1', '::1'],
    'generators' => [
        'crud' => [
            'class' => 'cadyrov\gii\crud\Generator',
                'templates' => [
                'crud' => 'cadyrov/gii/crud/default',
            ]
        ],
        'model' => [
            'class' => 'cadyrov\gii\model\Generator',
            'templates' => [
                'model' => 'cadyrov/gii/model/default',
            ]
        ]
    ],
];

There are reserved fields on generation CRUD - deleted_at