Google News
logo
Yii framework - Interview Questions
What is Gii in Yii2?
Gii is a web-based code-generator module provided by the Yii framework. It helps to create and generate fully customized forms, models, CRUD for databases, and more.
 
We can enable Gii by configuring it in the modules property of the application. Depending upon how we created our application. You may find the following code is already provided in the config/web.php configuration file :
$config = [ ... ];  
  
if (YII_ENV_DEV) {  
    $config['bootstrap'][] = 'gii';  
    $config['modules']['gii'] = [  
        'class' => 'yii\gii\Module',  
    ];  
} ​
 
Advertisement