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 ...
Get Yii2 By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.