Before we use Gii, the automatic code generator, we need to install it into our code base.
Run the following command to fetch the required files to use Gii:
$ php composer.phar require --prefer-dist "yiisoft/yii2-gii:*"
The command-line parameter
--prefer-dist is used, so we'll only get the files needed to use Gii, not develop it.
Now we need to wire Gii into our application:
requirecall should be placed inside the entry point of our application in the
<?php define('YII_DEBUG', true); require(__DIR__ ...