claudejanz/yii2-mygii

Gii Generator for double model generation

Installs: 18 959

Dependents: 3

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 3

Open Issues: 1

Type:yii2-extension

0.0.11 2017-12-14 10:52 UTC

This package is auto-updated.

Last update: 2024-04-11 17:41:01 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

This generator generates two ActiveRecord class for the specified database table. An empty one you can extend and a Base one which is the same as the original model generatior.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require "claudejanz/yii2-mygii": "dev-master"

or add

"claudejanz/yii2-mygii": "dev-master"

to the require section of your composer.json file.

Usage

//if your gii modules configuration looks like below:
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\gii\Module';

//remove this two lines
//Add this into common/config/main-local.php
    'bootstrap' => 'gii',
    'modules' => [
        'gii' => [
            'class' => 'yii\gii\Module',
            'generators' => [
                'doubleModel' => [
                    'class' => 'claudejanz\mygii\generators\model\Generator',
                ],
                'kartik-crud' => [
                    'class'     => 'claudejanz\mygii\generators\kcrud\Generator',
                ],
            ],
        ],
    ],