database.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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', true),
  47. 'engine' => env('DB_ENGINE', null),
  48. ],
  49. 'mysql_w' => [
  50. 'driver' => 'mysql',
  51. 'host' => env('DB_HOST_W', '127.0.0.1'),
  52. 'port' => env('DB_PORT_W', 3306),
  53. 'database' => env('DB_DATABASE_W', 'forge'),
  54. 'username' => env('DB_USERNAME_W', 'forge'),
  55. 'password' => env('DB_PASSWORD_W', ''),
  56. 'unix_socket' => env('DB_SOCKET_W', ''),
  57. 'charset' => env('DB_CHARSET_W', 'utf8mb4'),
  58. 'collation' => env('DB_COLLATION_W', 'utf8mb4_unicode_ci'),
  59. 'prefix' => env('DB_PREFIX_W', ''),
  60. 'strict' => env('DB_STRICT_MODE_W', true),
  61. 'engine' => env('DB_ENGINE_W', null),
  62. ],
  63. 'mysql_z' => [
  64. 'driver' => 'mysql',
  65. 'host' => env('DB_HOST_Z', '127.0.0.1'),
  66. 'port' => env('DB_PORT_Z', 3306),
  67. 'database' => env('DB_DATABASE_Z', 'forge'),
  68. 'username' => env('DB_USERNAME_Z', 'forge'),
  69. 'password' => env('DB_PASSWORD_Z', ''),
  70. 'unix_socket' => env('DB_SOCKET_Z', ''),
  71. 'charset' => env('DB_CHARSET_Z', 'utf8mb4'),
  72. 'collation' => env('DB_COLLATION_Z', 'utf8mb4_unicode_ci'),
  73. 'prefix' => env('DB_PREFIX_Z', ''),
  74. 'strict' => env('DB_STRICT_MODE_Z', true),
  75. 'engine' => env('DB_ENGINE_Z', null),
  76. ],
  77. 'mysql_t' => [
  78. 'driver' => 'mysql',
  79. 'host' => env('DB_HOST_T', '127.0.0.1'),
  80. 'port' => env('DB_PORT_T', 3306),
  81. 'database' => env('DB_DATABASE_T', 'forge'),
  82. 'username' => env('DB_USERNAME_T', 'forge'),
  83. 'password' => env('DB_PASSWORD_T', ''),
  84. 'unix_socket' => env('DB_SOCKET_T', ''),
  85. 'charset' => env('DB_CHARSET_T', 'utf8mb4'),
  86. 'collation' => env('DB_COLLATION_T', 'utf8mb4_unicode_ci'),
  87. 'prefix' => env('DB_PREFIX_T', ''),
  88. 'strict' => env('DB_STRICT_MODE_T', true),
  89. 'engine' => env('DB_ENGINE_T', null),
  90. ],
  91. 'mysql_c' => [
  92. 'driver' => 'mysql',
  93. 'host' => env('DB_HOST_C', '127.0.0.1'),
  94. 'port' => env('DB_PORT_C', 3306),
  95. 'database' => env('DB_DATABASE_C', 'forge'),
  96. 'username' => env('DB_USERNAME_C', 'forge'),
  97. 'password' => env('DB_PASSWORD_C', ''),
  98. 'unix_socket' => env('DB_SOCKET_C', ''),
  99. 'charset' => env('DB_CHARSET_C', 'utf8mb4'),
  100. 'collation' => env('DB_COLLATION_C', 'utf8mb4_unicode_ci'),
  101. 'prefix' => env('DB_PREFIX_C', ''),
  102. 'strict' => env('DB_STRICT_MODE_C', true),
  103. 'engine' => env('DB_ENGINE_C', null),
  104. ],
  105. 'mysql_s' => [
  106. 'driver' => 'mysql',
  107. 'host' => env('DB_HOST_S', '127.0.0.1'),
  108. 'port' => env('DB_PORT_S', 3306),
  109. 'database' => env('DB_DATABASE_S', 'forge'),
  110. 'username' => env('DB_USERNAME_S', 'forge'),
  111. 'password' => env('DB_PASSWORD_S', ''),
  112. 'unix_socket' => env('DB_SOCKET_S', ''),
  113. 'charset' => env('DB_CHARSET_S', 'utf8mb4'),
  114. 'collation' => env('DB_COLLATION_S', 'utf8mb4_unicode_ci'),
  115. 'prefix' => env('DB_PREFIX_S', ''),
  116. 'strict' => env('DB_STRICT_MODE_S', true),
  117. 'engine' => env('DB_ENGINE_S', null),
  118. ],
  119. 'mysql_szy' => [
  120. 'driver' => 'mysql',
  121. 'host' => env('DB_HOST_SZY', '127.0.0.1'),
  122. 'port' => env('DB_PORT_SZY', 3306),
  123. 'database' => env('DB_DATABASE_SZY', 'forge'),
  124. 'username' => env('DB_USERNAME_SZY', 'forge'),
  125. 'password' => env('DB_PASSWORD_SZY', ''),
  126. 'unix_socket' => env('DB_SOCKET_SZY', ''),
  127. 'charset' => env('DB_CHARSET_SZY', 'utf8mb4'),
  128. 'collation' => env('DB_COLLATION_SZY', 'utf8mb4_unicode_ci'),
  129. 'prefix' => env('DB_PREFIX_SZY', ''),
  130. 'strict' => env('DB_STRICT_MODE_SZY', true),
  131. 'engine' => env('DB_ENGINE_SZY', null),
  132. ],
  133. 'pgsql' => [
  134. 'driver' => 'pgsql',
  135. 'host' => env('DB_HOST', '127.0.0.1'),
  136. 'port' => env('DB_PORT', 5432),
  137. 'database' => env('DB_DATABASE', 'forge'),
  138. 'username' => env('DB_USERNAME', 'forge'),
  139. 'password' => env('DB_PASSWORD', ''),
  140. 'charset' => env('DB_CHARSET', 'utf8'),
  141. 'prefix' => env('DB_PREFIX', ''),
  142. 'schema' => env('DB_SCHEMA', 'public'),
  143. 'sslmode' => env('DB_SSL_MODE', 'prefer'),
  144. ],
  145. 'sqlsrv' => [
  146. 'driver' => 'sqlsrv',
  147. 'host' => env('DB_HOST', 'localhost'),
  148. 'port' => env('DB_PORT', 1433),
  149. 'database' => env('DB_DATABASE', 'forge'),
  150. 'username' => env('DB_USERNAME', 'forge'),
  151. 'password' => env('DB_PASSWORD', ''),
  152. 'charset' => env('DB_CHARSET', 'utf8'),
  153. 'prefix' => env('DB_PREFIX', ''),
  154. ],
  155. ],
  156. /*
  157. |--------------------------------------------------------------------------
  158. | Migration Repository Table
  159. |--------------------------------------------------------------------------
  160. |
  161. | This table keeps track of all the migrations that have already run for
  162. | your application. Using this information, we can determine which of
  163. | the migrations on disk haven't actually been run in the database.
  164. |
  165. */
  166. 'migrations' => 'migrations',
  167. /*
  168. |--------------------------------------------------------------------------
  169. | Redis Databases
  170. |--------------------------------------------------------------------------
  171. |
  172. | Redis is an open source, fast, and advanced key-value store that also
  173. | provides a richer set of commands than a typical key-value systems
  174. | such as APC or Memcached. Laravel makes it easy to dig right in.
  175. |
  176. */
  177. 'redis' => [
  178. 'client' => env('REDIS_CLIENT', 'phpredis'),
  179. 'cluster' => env('REDIS_CLUSTER', false),
  180. 'default' => [
  181. 'host' => env('REDIS_HOST', '127.0.0.1'),
  182. 'password' => env('REDIS_PASSWORD', null),
  183. 'port' => env('REDIS_PORT', 6379),
  184. 'database' => env('REDIS_DB', 0),
  185. ],
  186. 'cache' => [
  187. 'host' => env('REDIS_HOST', '127.0.0.1'),
  188. 'password' => env('REDIS_PASSWORD', null),
  189. 'port' => env('REDIS_PORT', 6379),
  190. 'database' => env('REDIS_CACHE_DB', 1),
  191. ],
  192. ],
  193. ];