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.

49 lines
1.4 KiB

6 years ago
  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' => 'kcadmin',
  10. 'basePath' => dirname(__DIR__),
  11. 'language' => 'zh-CN',
  12. 'controllerNamespace' => 'kcadmin\controllers',
  13. 'bootstrap' => ['log'],
  14. 'modules' => [],
  15. 'components' => [
  16. 'request' => [
  17. 'csrfParam' => '_csrf-kcadmin',
  18. ],
  19. 'user' => [
  20. 'identityClass' => 'common\models\User',
  21. 'enableAutoLogin' => true,
  22. 'identityCookie' => ['name' => '_identity-kcadmin', 'httpOnly' => true],
  23. ],
  24. 'session' => [
  25. // this is the name of the session cookie used for login on the app
  26. 'name' => 'kcadmin',
  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. ];