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.

47 lines
1.4 KiB

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