main-local.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. $config = [
  3. 'components' => [
  4. 'request' => [
  5. // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  6. 'cookieValidationKey' => '',
  7. ],
  8. ],
  9. ];
  10. if (!YII_ENV_TEST) {
  11. // configuration adjustments for 'dev' environment
  12. $config['bootstrap'][] = 'debug';
  13. $config['modules']['debug'] = [
  14. 'class' => yii\debug\Module::className(),
  15. //'allowedIPs' => ['127.0.0.1'],
  16. ];
  17. $config['bootstrap'][] = 'gii';
  18. $config['modules']['gii'] = [
  19. 'class' => yii\gii\Module::className(),
  20. //'allowedIPs' => ['127.0.0.1'],
  21. 'generators' => [
  22. 'crud' => [
  23. 'class' => \backend\components\gii\crud\Generator::className(),
  24. 'templates' => [
  25. 'default' => '@backend/components/gii/crud/default',
  26. 'yii' => '@vendor/yiisoft/yii2-gii/generators/crud/default',
  27. ]
  28. ]
  29. ],
  30. ];
  31. }
  32. return $config;