leonsuke

Yii web.php

Sep 22nd, 2019
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. <?php
  2.  
  3. $params = require __DIR__ . '/params.php';
  4. $db = require __DIR__ . '/db.php';
  5.  
  6. $config = [
  7. 'id' => 'basic',
  8. 'basePath' => dirname(__DIR__),
  9. 'bootstrap' => ['log'],
  10. 'aliases' => [
  11. '@bower' => '@vendor/bower-asset',
  12. '@npm' => '@vendor/npm-asset',
  13. ],
  14. 'name' => 'FINTAG P2P',
  15. 'components' => [
  16. 'request' => [
  17. // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  18. 'cookieValidationKey' => 'u7GSGjAJtd7TQqWog4Gl9TwAwsLXrYeG',
  19. ],
  20. 'cache' => [
  21. 'class' => 'yii\caching\FileCache',
  22. ],
  23. 'user' => [
  24. 'identityClass' => 'app\models\User',
  25. 'enableAutoLogin' => true,
  26. ],
  27. 'errorHandler' => [
  28. 'errorAction' => 'site/error',
  29. ],
  30. 'mailer' => [
  31. 'class' => 'yii\swiftmailer\Mailer',
  32. // send all mails to a file by default. You have to set
  33. // 'useFileTransport' to false and configure a transport
  34. // for the mailer to send real emails.
  35. 'useFileTransport' => true,
  36. ],
  37. 'log' => [
  38. 'traceLevel' => YII_DEBUG ? 3 : 0,
  39. 'targets' => [
  40. [
  41. 'class' => 'yii\log\FileTarget',
  42. 'levels' => ['error', 'warning'],
  43. ],
  44. ],
  45. ],
  46. 'urlManager' => [
  47. 'enablePrettyUrl' => true,
  48. 'showScriptName' => false,
  49. 'rules' => [
  50. ],
  51. ],
  52. 'db'=>array(
  53. 'class' => 'yii\db\Connection',
  54. 'connectionString' => 'mysql:charset=utf8mb4;host=localhost;dbname=fintagid_appfintag',
  55. 'username' => 'root',
  56. 'password' => 'admin',
  57. 'charset' => 'utf8',
  58. ),
  59. 'db2'=>array(
  60. 'class' => 'yii\db\Connection',
  61. 'connectionString' => 'mysql:charset=utf8mb4;host=localhost;dbname=fintagid_p2p_prod',
  62. 'username' => 'root',
  63. 'password' => 'admin',
  64. 'charset' => 'utf8',
  65. ),
  66. ],
  67. 'modules' => [
  68. 'gridview' => [
  69. 'class' => '\kartik\grid\Module',
  70. // enter optional module parameters below - only if you need to
  71. // use your own export download action or custom translation
  72. // message source
  73. // 'downloadAction' => 'gridview/export/download',
  74. // 'i18n' => []
  75. ],
  76. ],
  77. 'params' => $params,
  78. ];
  79.  
  80. if (YII_ENV_DEV) {
  81. // configuration adjustments for 'dev' environment
  82. $config['bootstrap'][] = 'debug';
  83. $config['modules']['debug'] = [
  84. 'class' => 'yii\debug\Module',
  85. // uncomment the following to add your IP if you are not connecting from localhost.
  86. //'allowedIPs' => ['127.0.0.1', '::1'],
  87. ];
  88.  
  89. $config['bootstrap'][] = 'gii';
  90. $config['modules']['gii'] = [
  91. 'class' => 'yii\gii\Module',
  92. // uncomment the following to add your IP if you are not connecting from localhost.
  93. //'allowedIPs' => ['127.0.0.1', '::1'],
  94. ];
  95. }
  96.  
  97. return $config;
Advertisement
Add Comment
Please, Sign In to add comment