To use Gii, include it as a module in the application configuration like the following:
~~~
return [
'bootstrap' => ['gii'],
'modules' => [
'gii' => ['class' => 'yii\gii\Module'],
],
]
~~~
Because Gii generates new code files on the server, you should only use it on your own
development machine. To prevent other people from using this module, by default, Gii
can only be accessed by localhost. You may configure its [[allowedIPs]] property if
you want to make it accessible on other machines.
With the above configuration, you will be able to access GiiModule in your browser using
the URL http://localhost/path/to/index.php?r=gii
If your application enables [[\yii\web\UrlManager::enablePrettyUrl|pretty URLs]],
you can then access Gii via URL: http://localhost/path/to/index.php/gii