The Gii extension for the Yii framework
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 3 617
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Type:yii2-extension
This package has no released version yet, and little information is available.
README
Gii.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --dev --prefer-dist yii2-extensions/gii
or add
"yii2-extensions/gii": "dev-main"
to the require-dev section of your composer.json
file.
Usage
Once the extension is installed, simply modify your application configuration as follows:
return [ 'bootstrap' => ['gii'], 'modules' => [ 'gii' => [ 'class' => 'yii\gii\Module', ], // ... ], // ... ];
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
Using the same configuration for your console application, you will also be able to access Gii via command line as follows,
# change path to your application's base path
cd path/to/AppBasePath
# show help information about Gii
yii help gii
# show help information about the model generator in Gii
yii help gii/model
# generate City model from city table
yii gii/model --tableName=city --modelClass=City
Configure with yiisoft/config
Add the following code to your
config/config-plugin
file in your application.
'config-plugin' => [ 'web' => [ '$yii2-gii', // add this line 'web/*.php' ], ],
For activate the gii generator, add in your config/params.php file in your application.
return [ 'yii2.gii' => true, ];
For change allowed IPs, add in your config/params.php file in your application.
return [ 'yii2.gii.allowedIPs' => ['192.168.1.1'], ];
For class map module, add in your config/params.php file in your application.
use App\YourClass; return [ 'yii2.gii.classMap' => [ 'class' => YourClass::class, ], ];
Testing
Check the documentation testing to learn about testing.
Quality code
Support versions Yii2
Our social networks
License
The MIT License. Please see License File for more information.