web.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. $params = require(__DIR__ . '/../params.php');
  3. $basePath = dirname(__DIR__);
  4. $webroot = dirname($basePath);
  5. $config = [
  6. 'id' => 'basic',
  7. 'basePath' => dirname(__DIR__). '/../',
  8. 'runtimePath' => $webroot . '/../runtime',
  9. 'vendorPath' => $webroot . '/../vendor',
  10. 'bootstrap' => ['log'],
  11. 'components' => require(__DIR__ . '/components.php'),
  12. 'modules' => require(__DIR__ . '/modules.php'),
  13. 'params' => $params,
  14. ];
  15. if (YII_ENV_DEV) {
  16. // configuration adjustments for 'dev' environment
  17. $config['bootstrap'][] = 'debug';
  18. $config['modules']['debug'] = [
  19. 'class' => 'yii\debug\Module',
  20. // uncomment the following to add your IP if you are not connecting from localhost.
  21. //'allowedIPs' => ['127.0.0.1', '::1'],
  22. ];
  23. $config['bootstrap'][] = 'gii';
  24. $config['modules']['gii'] = [
  25. 'class' => 'yii\gii\Module',
  26. // uncomment the following to add your IP if you are not connecting from localhost.
  27. //'allowedIPs' => ['127.0.0.1', '::1'],
  28. ];
  29. }
  30. return $config;