database.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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_tong' => [
  66. 'driver' => 'mysql',
  67. 'host' => env('DB_HOST_TONG', '127.0.0.1'),
  68. 'port' => env('DB_PORT_TONG', 3306),
  69. 'database' => env('DB_DATABASE_TONG', 'forge'),
  70. 'username' => env('DB_USERNAME_TONG', 'forge'),
  71. 'password' => env('DB_PASSWORD_TONG', ''),
  72. 'unix_socket' => env('DB_SOCKET_TONG', ''),
  73. 'charset' => env('DB_CHARSET_TONG', 'utf8mb4'),
  74. 'collation' => env('DB_COLLATION_TONG', '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_TONG', '+08:00'),
  79. ],
  80. 'pgsql' => [
  81. 'driver' => 'pgsql',
  82. 'host' => env('DB_HOST', '127.0.0.1'),
  83. 'port' => env('DB_PORT', 5432),
  84. 'database' => env('DB_DATABASE', 'forge'),
  85. 'username' => env('DB_USERNAME', 'forge'),
  86. 'password' => env('DB_PASSWORD', ''),
  87. 'charset' => env('DB_CHARSET', 'utf8'),
  88. 'prefix' => env('DB_PREFIX', ''),
  89. 'schema' => env('DB_SCHEMA', 'public'),
  90. 'sslmode' => env('DB_SSL_MODE', 'prefer'),
  91. ],
  92. 'sqlsrv' => [
  93. 'driver' => 'sqlsrv',
  94. 'host' => env('DB_HOST', 'localhost'),
  95. 'port' => env('DB_PORT', 1433),
  96. 'database' => env('DB_DATABASE', 'forge'),
  97. 'username' => env('DB_USERNAME', 'forge'),
  98. 'password' => env('DB_PASSWORD', ''),
  99. 'charset' => env('DB_CHARSET', 'utf8'),
  100. 'prefix' => env('DB_PREFIX', ''),
  101. ],
  102. ],
  103. /*
  104. |--------------------------------------------------------------------------
  105. | Migration Repository Table
  106. |--------------------------------------------------------------------------
  107. |
  108. | This table keeps track of all the migrations that have already run for
  109. | your application. Using this information, we can determine which of
  110. | the migrations on disk haven't actually been run in the database.
  111. |
  112. */
  113. 'migrations' => 'migrations',
  114. /*
  115. |--------------------------------------------------------------------------
  116. | Redis Databases
  117. |--------------------------------------------------------------------------
  118. |
  119. | Redis is an open source, fast, and advanced key-value store that also
  120. | provides a richer set of commands than a typical key-value systems
  121. | such as APC or Memcached. Laravel makes it easy to dig right in.
  122. |
  123. */
  124. 'redis' => [
  125. 'client' => 'predis',
  126. 'cluster' => env('REDIS_CLUSTER', false),
  127. 'default' => [
  128. 'host' => env('REDIS_HOST', '127.0.0.1'),
  129. 'password' => env('REDIS_PASSWORD', null),
  130. 'port' => env('REDIS_PORT', 6379),
  131. 'database' => env('REDIS_DB', 0),
  132. ],
  133. 'cache' => [
  134. 'host' => env('REDIS_HOST', '127.0.0.1'),
  135. 'password' => env('REDIS_PASSWORD', null),
  136. 'port' => env('REDIS_PORT', 6379),
  137. 'database' => env('REDIS_CACHE_DB', 1),
  138. ],
  139. ],
  140. ];