0
0

main.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. 'db' => require __DIR__ . '/../../common/config/db-local.php',
  40. /*
  41. 'urlManager' => [
  42. 'enablePrettyUrl' => true,
  43. 'showScriptName' => false,
  44. 'rules' => [
  45. ],
  46. ],
  47. */
  48. ],
  49. 'params' => $params,
  50. ];