yii2-gouble-model-gii Generates two ActiveRecord class for a database table. An empty one you can extend and and a base one.

yii2-double-model-gii

  1. Installation
  2. Usage

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',
                ],
            ],
        ],
    ],
2 0
6 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: Database
Developed by: klod
Created on: Jul 13, 2014
Last updated: 4 years ago

Related Extensions