database.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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_general_ci',
  45. 'prefix' => '',
  46. 'strict' => false,
  47. 'engine' => null
  48. ],
  49. 'mysql_datalog' => [
  50. 'driver' => 'mysql',
  51. 'host' => env('DATALOG_DB_HOST', '127.0.0.1'),
  52. 'port' => env('DATALOG_DB_PORT', '3306'),
  53. 'database' => env('DATALOG_DB_DATABASE', 'forge'),
  54. 'username' => env('DATALOG_DB_USERNAME', 'forge'),
  55. 'password' => env('DATALOG_DB_PASSWORD', ''),
  56. 'unix_socket' => env('DATALOG_DB_SOCKET', ''),
  57. 'charset' => 'utf8mb4',
  58. 'collation' => 'utf8mb4_general_ci',
  59. 'prefix' => '',
  60. 'strict' => true,
  61. 'engine' => null,
  62. ],
  63. 'mysql_fenpeiduixiang' => [
  64. 'driver' => 'mysql',
  65. 'host' => env('FPDX_DB_HOST', '127.0.0.1'),
  66. 'port' => env('FPDX_DB_PORT', '3306'),
  67. 'database' => env('FPDX_DB_DATABASE', 'forge'),
  68. 'username' => env('FPDX_DB_USERNAME', 'forge'),
  69. 'password' => env('FPDX_DB_PASSWORD', ''),
  70. 'unix_socket' => env('FPDX_DB_SOCKET', ''),
  71. 'charset' => 'utf8mb4',
  72. 'collation' => 'utf8mb4_general_ci',
  73. 'prefix' => '',
  74. 'strict' => true,
  75. 'engine' => null,
  76. ],
  77. 'pgsql' => [
  78. 'driver' => 'pgsql',
  79. 'host' => env('DB_HOST', '127.0.0.1'),
  80. 'port' => env('DB_PORT', '5432'),
  81. 'database' => env('DB_DATABASE', 'forge'),
  82. 'username' => env('DB_USERNAME', 'forge'),
  83. 'password' => env('DB_PASSWORD', ''),
  84. 'charset' => 'utf8',
  85. 'prefix' => '',
  86. 'schema' => 'public',
  87. 'sslmode' => 'prefer',
  88. ],
  89. 'sqlsrv' => [
  90. 'driver' => 'sqlsrv',
  91. 'host' => env('DB_HOST', 'localhost'),
  92. 'port' => env('DB_PORT', '1433'),
  93. 'database' => env('DB_DATABASE', 'forge'),
  94. 'username' => env('DB_USERNAME', 'forge'),
  95. 'password' => env('DB_PASSWORD', ''),
  96. 'charset' => 'utf8',
  97. 'prefix' => '',
  98. ],
  99. ],
  100. /*
  101. |--------------------------------------------------------------------------
  102. | Migration Repository Table
  103. |--------------------------------------------------------------------------
  104. |
  105. | This table keeps track of all the migrations that have already run for
  106. | your application. Using this information, we can determine which of
  107. | the migrations on disk haven't actually been run in the database.
  108. |
  109. */
  110. 'migrations' => 'migrations',
  111. /*
  112. |--------------------------------------------------------------------------
  113. | Redis Databases
  114. |--------------------------------------------------------------------------
  115. |
  116. | Redis is an open source, fast, and advanced key-value store that also
  117. | provides a richer set of commands than a typical key-value systems
  118. | such as APC or Memcached. Laravel makes it easy to dig right in.
  119. |
  120. */
  121. 'redis' => [
  122. 'client' => 'predis',
  123. 'default' => [
  124. 'host' => env('REDIS_HOST', null),
  125. 'password' => env('REDIS_PASSWORD', null),
  126. 'port' => env('REDIS_PORT', 6379),
  127. 'database' => 5,
  128. 'parameters' => [
  129. 'password' => env('REDIS_PASSWORD', null)
  130. ]
  131. ],
  132. ],
  133. ];