Using Gii to create room, customer, and reservation models
Yii2 provides a powerful tool to generate models, controllers, and CRUD (create, read, update, and delete) actions, forms, modules, and extensions: Gii.
At the bottom of the basic/config/web.php
file, placed in the basic standard configuration, there is a block of code that enables Gii:
if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = 'yii\debug\Module'; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = 'yii\gii\Module'; }
Verify that these lines are present, otherwise append them at the bottom of the web.php
file before the return $config
statement. The last check is in basic/web/index.php
. Verify that YII_ENV
is dev
, with this line:
defined('YII_ENV') or define('YII_ENV', 'dev')...