The preferred way to install this extension is through composer.
Either run
php composer.phar require --dev --prefer-dist yiisoft/yii-gii
or add
"yiisoft/yii-gii": "^3.0@dev"
to the require-dev section of your composer.json
file.
You can then access Gii through the following URL:
http://localhost/path/to/index.php?r=gii
If you have enabled pretty URLs, you may use the following URL:
http://localhost/path/to/index.php/gii
Note: if you are accessing gii from an IP address other than localhost, access will be denied by default. To circumvent that default, add the allowed IP addresses to the configuration:
'gii' => [
'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'] // adjust this to your needs
//...
],
If you have configured Gii similarly in your console application configuration, you may also access Gii through command window like the following:
# 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