You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

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