1
0

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