database.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. 'mysql_dwbs' => [
  50. 'driver' => 'mysql',
  51. 'host' => env('DB_HOST_DWBS', '127.0.0.1'),
  52. 'port' => env('DB_PORT_DWBS', 3306),
  53. 'database' => env('DB_DATABASE_DWBS', 'forge'),
  54. 'username' => env('DB_USERNAME_DWBS', 'forge'),
  55. 'password' => env('DB_PASSWORD_DWBS', ''),
  56. 'unix_socket' => env('DB_SOCKET_DWBS', ''),
  57. 'charset' => env('DB_CHARSET_DWBS', 'utf8mb4'),
  58. 'collation' => env('DB_COLLATION_DWBS', 'utf8mb4_unicode_ci'),
  59. 'prefix' => env('DB_PREFIX', ''),
  60. 'strict' => env('DB_STRICT_MODE', false),
  61. 'engine' => env('DB_ENGINE', null),
  62. 'timezone' => env('DB_TIMEZONE_DWBS', '+08:00'),
  63. ],
  64. 'pgsql' => [
  65. 'driver' => 'pgsql',
  66. 'host' => env('DB_HOST', '127.0.0.1'),
  67. 'port' => env('DB_PORT', '5432'),
  68. 'database' => env('DB_DATABASE', 'forge'),
  69. 'username' => env('DB_USERNAME', 'forge'),
  70. 'password' => env('DB_PASSWORD', ''),
  71. 'charset' => 'utf8',
  72. 'prefix' => '',
  73. 'schema' => 'public',
  74. 'sslmode' => 'prefer',
  75. ],
  76. 'sqlsrv' => [
  77. 'driver' => 'sqlsrv',
  78. 'host' => env('DB_HOST', 'localhost'),
  79. 'port' => env('DB_PORT', '1433'),
  80. 'database' => env('DB_DATABASE', 'forge'),
  81. 'username' => env('DB_USERNAME', 'forge'),
  82. 'password' => env('DB_PASSWORD', ''),
  83. 'charset' => 'utf8',
  84. 'prefix' => '',
  85. ],
  86. ],
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Migration Repository Table
  90. |--------------------------------------------------------------------------
  91. |
  92. | This table keeps track of all the migrations that have already run for
  93. | your application. Using this information, we can determine which of
  94. | the migrations on disk haven't actually been run in the database.
  95. |
  96. */
  97. 'migrations' => 'migrations',
  98. /*
  99. |--------------------------------------------------------------------------
  100. | Redis Databases
  101. |--------------------------------------------------------------------------
  102. |
  103. | Redis is an open source, fast, and advanced key-value store that also
  104. | provides a richer set of commands than a typical key-value systems
  105. | such as APC or Memcached. Laravel makes it easy to dig right in.
  106. |
  107. */
  108. 'redis' => [
  109. 'client' => 'predis',
  110. 'default' => [
  111. 'host' => env('REDIS_HOST', '127.0.0.1'),
  112. 'password' => env('REDIS_PASSWORD', null),
  113. 'port' => env('REDIS_PORT', 6379),
  114. 'database' => 1,
  115. ],
  116. ],
  117. ];