lengbin/yii-gii-model

This generator generates an ActiveRecord class for the specified database table.

1.0 2019-06-15 02:29 UTC

This package is auto-updated.

Last update: 2024-04-15 13:04:36 UTC


README

993323

Yii2 generate model


This extension provides a Web-based code generator, called Gii, for Yii framework 2.0 applications. You can use Gii to quickly generate model. Refactor the code, add table comment

For license information check the LICENSE-file.

Installation

The preferred way to install this extension is through composer.

Either run

composer require lengbin/yii-gii-model

or add

"lengbin/yii-gii-model": *

to the require-dev section of your composer.json file.

Usage

Once the extension is installed, simply modify your application configuration at your application\config\main_local.php as follows:

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class'      => 'yii\gii\Module',
        'generators' => [
            'model' => [
                'class' => 'lengbin\gii\model\Generator',
            ],
            //...
        ],
    ];
    //...

You can then access Gii through the following URL:

http://localhost/path/to/index.php?r=gii

or if you have enabled pretty URLs, you may use the following URL:

http://localhost/path/to/index.php/gii

Screenshots

giiant-0 2-screen-1