database.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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' => env('DB_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' => env('DB_CHARSET', 'utf8mb4'),
  44. 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
  45. 'prefix' => env('DB_PREFIX', ''),
  46. 'strict' => env('DB_STRICT_MODE', false),
  47. 'engine' => env('DB_ENGINE', null),
  48. 'timezone' => env('DB_TIMEZONE', '+08:00'),
  49. ],
  50. 'mysql_dwbs' => [
  51. 'driver' => 'mysql',
  52. 'host' => env('DB_HOST_DWBS', '127.0.0.1'),
  53. 'port' => env('DB_PORT_DWBS', 3306),
  54. 'database' => env('DB_DATABASE_DWBS', 'forge'),
  55. 'username' => env('DB_USERNAME_DWBS', 'forge'),
  56. 'password' => env('DB_PASSWORD_DWBS', ''),
  57. 'unix_socket' => env('DB_SOCKET_DWBS', ''),
  58. 'charset' => env('DB_CHARSET_DWBS', 'utf8mb4'),
  59. 'collation' => env('DB_COLLATION_DWBS', 'utf8mb4_unicode_ci'),
  60. 'prefix' => env('DB_PREFIX', ''),
  61. 'strict' => env('DB_STRICT_MODE', false),
  62. 'engine' => env('DB_ENGINE', null),
  63. 'timezone' => env('DB_TIMEZONE_DWBS', '+08:00'),
  64. ],
  65. 'mysql_weidian' => [
  66. 'driver' => 'mysql',
  67. 'host' => env('DB_HOST_WD', '127.0.0.1'),
  68. 'port' => env('DB_PORT_WD', 3306),
  69. 'database' => env('DB_DATABASE_WD', 'forge'),
  70. 'username' => env('DB_USERNAME_WD', 'forge'),
  71. 'password' => env('DB_PASSWORD_WD', ''),
  72. 'unix_socket' => env('DB_SOCKET_WD', ''),
  73. 'charset' => env('DB_CHARSET_WD', 'utf8mb4'),
  74. 'collation' => env('DB_COLLATION_WD', 'utf8mb4_unicode_ci'),
  75. 'prefix' => env('DB_PREFIX', ''),
  76. 'strict' => env('DB_STRICT_MODE', false),
  77. 'engine' => env('DB_ENGINE', null),
  78. 'timezone' => env('DB_TIMEZONE_WD', '+08:00'),
  79. ],
  80. 'mysql_tong' => [
  81. 'driver' => 'mysql',
  82. 'host' => env('DB_HOST_TONG', '127.0.0.1'),
  83. 'port' => env('DB_PORT_TONG', 3306),
  84. 'database' => env('DB_DATABASE_TONG', 'forge'),
  85. 'username' => env('DB_USERNAME_TONG', 'forge'),
  86. 'password' => env('DB_PASSWORD_TONG', ''),
  87. 'unix_socket' => env('DB_SOCKET_TONG', ''),
  88. 'charset' => env('DB_CHARSET_TONG', 'utf8mb4'),
  89. 'collation' => env('DB_COLLATION_TONG', 'utf8mb4_unicode_ci'),
  90. 'prefix' => env('DB_PREFIX', ''),
  91. 'strict' => env('DB_STRICT_MODE', false),
  92. 'engine' => env('DB_ENGINE', null),
  93. 'timezone' => env('DB_TIMEZONE_TONG', '+08:00'),
  94. ],
  95. 'pgsql' => [
  96. 'driver' => 'pgsql',
  97. 'host' => env('DB_HOST', '127.0.0.1'),
  98. 'port' => env('DB_PORT', 5432),
  99. 'database' => env('DB_DATABASE', 'forge'),
  100. 'username' => env('DB_USERNAME', 'forge'),
  101. 'password' => env('DB_PASSWORD', ''),
  102. 'charset' => env('DB_CHARSET', 'utf8'),
  103. 'prefix' => env('DB_PREFIX', ''),
  104. 'schema' => env('DB_SCHEMA', 'public'),
  105. 'sslmode' => env('DB_SSL_MODE', 'prefer'),
  106. ],
  107. 'sqlsrv' => [
  108. 'driver' => 'sqlsrv',
  109. 'host' => env('DB_HOST', 'localhost'),
  110. 'port' => env('DB_PORT', 1433),
  111. 'database' => env('DB_DATABASE', 'forge'),
  112. 'username' => env('DB_USERNAME', 'forge'),
  113. 'password' => env('DB_PASSWORD', ''),
  114. 'charset' => env('DB_CHARSET', 'utf8'),
  115. 'prefix' => env('DB_PREFIX', ''),
  116. ],
  117. ],
  118. /*
  119. |--------------------------------------------------------------------------
  120. | Migration Repository Table
  121. |--------------------------------------------------------------------------
  122. |
  123. | This table keeps track of all the migrations that have already run for
  124. | your application. Using this information, we can determine which of
  125. | the migrations on disk haven't actually been run in the database.
  126. |
  127. */
  128. 'migrations' => 'migrations',
  129. /*
  130. |--------------------------------------------------------------------------
  131. | Redis Databases
  132. |--------------------------------------------------------------------------
  133. |
  134. | Redis is an open source, fast, and advanced key-value store that also
  135. | provides a richer set of commands than a typical key-value systems
  136. | such as APC or Memcached. Laravel makes it easy to dig right in.
  137. |
  138. */
  139. 'redis' => [
  140. 'client' => 'predis',
  141. 'cluster' => env('REDIS_CLUSTER', false),
  142. 'default' => [
  143. 'host' => env('REDIS_HOST', '127.0.0.1'),
  144. 'password' => env('REDIS_PASSWORD', null),
  145. 'port' => env('REDIS_PORT', 6379),
  146. 'database' => env('REDIS_DB', 0),
  147. ],
  148. 'cache' => [
  149. 'host' => env('REDIS_HOST', '127.0.0.1'),
  150. 'password' => env('REDIS_PASSWORD', null),
  151. 'port' => env('REDIS_PORT', 6379),
  152. 'database' => env('REDIS_CACHE_DB', 1),
  153. ],
  154. ],
  155. ];