First of all, you should install yii2 to follow these steps. After installation, you can then access Gii tool through the following URL: http://localhost/path/to/index.php?r=gii [eg: http://localhost/yii2advanced/frontend/web/index.php?r=gii] If you have enabled pretty URLs, you may use the following URL: http://localhost/path/to/index.php/gii [eg: http://localhost/yii2advanced/frontend/web/index.php/gii] possible errors: Page Not Found, Unable to resolve the request gii solution: check whether the gii module is enabled in @app/frontend/config/main-local.php
| if (!YII_ENV_TEST) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = 'yii\gii\Module'; } |
Model Generator This generator generates an ActiveRecord class for the specified database table. Click “start” button under model generator to create Models. Before that, create table…read more