Gii is an automatic code generation tool introduced in Yii 2.0. Code generation in Gii is quiet easy as filling the right information as per the instructions.


Starting Gii

By default, Gii is always enabled in the developing mode due to following code in the entry script web/index.php file in Yii:

defined('YII_ENV') or define('YII_ENV', 'dev');

http://localhost/advanced2/frontend/web/index.php?r=gii

YII What is gii 1

This is the Gii output. From here you can generate your codes automatically.