0
0

main.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. $params = array_merge(
  3. require __DIR__ . '/../../common/config/params.php',
  4. require __DIR__ . '/../../common/config/params-local.php',
  5. require __DIR__ . '/params.php',
  6. require __DIR__ . '/params-local.php'
  7. );
  8. return [
  9. 'id' => 'app-frontend',
  10. 'basePath' => dirname(__DIR__),
  11. 'bootstrap' => ['log'],
  12. 'controllerNamespace' => 'frontend\controllers',
  13. 'components' => [
  14. 'request' => [
  15. 'csrfParam' => '_csrf-frontend',
  16. ],
  17. 'user' => [
  18. 'identityClass' => 'common\models\User',
  19. 'enableAutoLogin' => true,
  20. 'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true],
  21. ],
  22. 'session' => [
  23. // this is the name of the session cookie used for login on the frontend
  24. 'name' => 'advanced-frontend',
  25. ],
  26. 'log' => [
  27. 'traceLevel' => YII_DEBUG ? 3 : 0,
  28. 'targets' => [
  29. [
  30. 'class' => 'yii\log\FileTarget',
  31. 'levels' => ['error', 'warning'],
  32. ],
  33. ],
  34. ],
  35. 'errorHandler' => [
  36. 'errorAction' => 'site/error',
  37. ],
  38. 'db' => require __DIR__ . '/../../common/config/db-local.php',
  39. /*
  40. 'urlManager' => [
  41. 'enablePrettyUrl' => true,
  42. 'showScriptName' => false,
  43. 'rules' => [
  44. ],
  45. ],
  46. */
  47. ],
  48. 'params' => $params,
  49. ];