lengbin / yii-gii-model
This generator generates an ActiveRecord class for the specified database table.
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-03-15 15:19:27 UTC
README
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