database.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Database Connection Name
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here you may specify which of the database connections below you wish
  9. | to use as your default connection for all database work. Of course
  10. | you may use many connections at once using the Database library.
  11. |
  12. */
  13. 'default' => env('DB_CONNECTION', 'mysql'),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Database Connections
  17. |--------------------------------------------------------------------------
  18. |
  19. | Here are each of the database connections setup for your application.
  20. | Of course, examples of configuring each database platform that is
  21. | supported by Laravel is shown below to make development simple.
  22. |
  23. |
  24. | All database work in Laravel is done through the PHP PDO facilities
  25. | so make sure you have the driver for your particular database of
  26. | choice installed on your machine before you begin development.
  27. |
  28. */
  29. 'connections' => [
  30. 'sqlite' => [
  31. 'driver' => 'sqlite',
  32. 'database' => env('DB_DATABASE', database_path('database.sqlite')),
  33. 'prefix' => '',
  34. ],
  35. 'mysql' => [
  36. 'driver' => 'mysql',
  37. 'host' => env('DB_HOST', '127.0.0.1'),
  38. 'port' => env('DB_PORT', '3306'),
  39. 'database' => env('DB_DATABASE', 'forge'),
  40. 'username' => env('DB_USERNAME', 'forge'),
  41. 'password' => env('DB_PASSWORD', ''),
  42. 'unix_socket' => env('DB_SOCKET', ''),
  43. 'charset' => 'utf8mb4',
  44. 'collation' => 'utf8mb4_unicode_ci',
  45. 'prefix' => '',
  46. 'strict' => false,
  47. 'engine' => null,
  48. ],
  49. 'report_system' => [
  50. 'driver' => 'mysql',
  51. 'host' => env('DB_HOST', '127.0.0.1'),
  52. 'port' => env('DB_PORT', '3306'),
  53. 'database' => 'report_system',
  54. 'username' => env('DB_USERNAME', 'forge'),
  55. 'password' => env('DB_PASSWORD', ''),
  56. 'unix_socket' => '',
  57. 'charset' => 'utf8mb4',
  58. 'collation' => 'utf8mb4_unicode_ci',
  59. 'prefix' => '',
  60. 'strict' => false,
  61. 'engine' => null,
  62. ],
  63. 'fangyi' => [
  64. 'driver' => 'mysql',
  65. 'host' => env('DB_HOST', '127.0.0.1'),
  66. 'port' => 3306,
  67. 'database' => 'fangyi',
  68. 'username' => env('DB_USERNAME', 'forge'),
  69. 'password' => env('DB_PASSWORD', ''),
  70. /*'username' => 'root',
  71. 'password' => 'root',*/
  72. 'unix_socket' => '',
  73. 'charset' => 'utf8mb4',
  74. 'collation' => 'utf8mb4_unicode_ci',
  75. 'prefix' => '',
  76. 'strict' => false,
  77. 'engine' => null,
  78. ],
  79. 'transfer_center' => [
  80. 'driver' => 'mysql',
  81. 'host' => env('DB_HOST_CENTER', 'localhost'),
  82. 'port' => env('DB_PORT_CENTER', '3306'),
  83. 'database' => env('DB_DATABASE_CENTER', 'forge'),
  84. 'username' => env('DB_USERNAME_CENTER', 'forge'),
  85. 'password' => env('DB_PASSWORD_CENTER', ''),
  86. 'charset' => 'utf8',
  87. 'collation' => 'utf8_unicode_ci',
  88. 'prefix' => '',
  89. 'strict' => false,
  90. 'engine' => null,
  91. ],
  92. 'pgsql' => [
  93. 'driver' => 'pgsql',
  94. 'host' => env('DB_HOST', '127.0.0.1'),
  95. 'port' => env('DB_PORT', '5432'),
  96. 'database' => env('DB_DATABASE', 'forge'),
  97. 'username' => env('DB_USERNAME', 'forge'),
  98. 'password' => env('DB_PASSWORD', ''),
  99. 'charset' => 'utf8',
  100. 'prefix' => '',
  101. 'schema' => 'public',
  102. 'sslmode' => 'prefer',
  103. ],
  104. 'sqlsrv' => [
  105. 'driver' => 'sqlsrv',
  106. 'host' => env('DB_HOST', 'localhost'),
  107. 'port' => env('DB_PORT', '1433'),
  108. 'database' => env('DB_DATABASE', 'forge'),
  109. 'username' => env('DB_USERNAME', 'forge'),
  110. 'password' => env('DB_PASSWORD', ''),
  111. 'charset' => 'utf8',
  112. 'prefix' => '',
  113. ],
  114. ],
  115. /*
  116. |--------------------------------------------------------------------------
  117. | Migration Repository Table
  118. |--------------------------------------------------------------------------
  119. |
  120. | This table keeps track of all the migrations that have already run for
  121. | your application. Using this information, we can determine which of
  122. | the migrations on disk haven't actually been run in the database.
  123. |
  124. */
  125. 'migrations' => 'migrations',
  126. /*
  127. |--------------------------------------------------------------------------
  128. | Redis Databases
  129. |--------------------------------------------------------------------------
  130. |
  131. | Redis is an open source, fast, and advanced key-value store that also
  132. | provides a richer set of commands than a typical key-value systems
  133. | such as APC or Memcached. Laravel makes it easy to dig right in.
  134. |
  135. */
  136. 'redis' => [
  137. 'client' => 'predis',
  138. 'default' => [
  139. 'host' => env('REDIS_HOST', '127.0.0.1'),
  140. 'password' => env('REDIS_PASSWORD', null),
  141. 'port' => env('REDIS_PORT', 6379),
  142. 'database' => 0,
  143. ],
  144. ],
  145. ];