php - How to activate Gii Code Generator in Yii 2.0.6? -
i have updated yii version using composer 2.0.6. when try locate gii, yii through 404 not found error.
screen shot:
composer.json file:
{ "name": "yiisoft/yii2-app-advanced", "description": "yii 2 advanced project template", "keywords": ["yii2", "framework", "advanced", "project template"], "homepage": "http://www.yiiframework.com/", "type": "project", "license": "bsd-3-clause", "support": { "issues": "https://github.com/yiisoft/yii2/issues?state=open", "forum": "http://www.yiiframework.com/forum/", "wiki": "http://www.yiiframework.com/wiki/", "irc": "irc://irc.freenode.net/yii", "source": "https://github.com/yiisoft/yii2" }, "minimum-stability": "stable", "require": { "php": ">=5.4.0", "yiisoft/yii2": ">=2.0.6", "yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-swiftmailer": "*" }, "require-dev": { "yiisoft/yii2-codeception": "*", "yiisoft/yii2-debug": "*", "yiisoft/yii2-gii": "*", "yiisoft/yii2-faker": "*" }, "config": { "process-timeout": 1800 }, "extra": { "asset-installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower" } } }
frontend/config/main-local.php:
<?php return [ 'components' => [ 'request' => [ // !!! insert secret key in following (if empty) - required cookie validation 'cookievalidationkey' => '69pnggqfard-9mr7h9lm3m0saebjd9dr', ], ], ];
can tell me how activate gii in yii2 2.0.6? in advance!
change code in /frontend/config/main-local.php
to:
$config = [ 'components' => [ 'request' => [ // !!! insert secret key in following (if empty) - required cookie validation 'cookievalidationkey' => '69pnggqfard-9mr7h9lm3m0saebjd9dr', ], ], ]; if (!yii_env_test) { // configuration adjustments 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\module', ]; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\module', ]; } return $config;
Comments
Post a Comment