database.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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', '+00:00'),
  49. ],
  50. 'mongodb' => [
  51. 'driver' => 'mongodb',
  52. 'host' => env('MONGO_HOST', 'localhost'),
  53. 'port' => env('MONGO_PORT', 27017),
  54. 'database' => env('MONGO_DATABASE'),
  55. 'username' => env('MONGO_USERNAME'),
  56. 'password' => env('MONGO_PASSWORD'),
  57. 'options' => [
  58. 'database' => env('MONGO_DATABASE','match_tag') // sets the authentication database required by mongo 3
  59. ]
  60. ],
  61. 'pgsql' => [
  62. 'driver' => 'pgsql',
  63. 'host' => env('DB_HOST', '127.0.0.1'),
  64. 'port' => env('DB_PORT', 5432),
  65. 'database' => env('DB_DATABASE', 'forge'),
  66. 'username' => env('DB_USERNAME', 'forge'),
  67. 'password' => env('DB_PASSWORD', ''),
  68. 'charset' => env('DB_CHARSET', 'utf8'),
  69. 'prefix' => env('DB_PREFIX', ''),
  70. 'schema' => env('DB_SCHEMA', 'public'),
  71. 'sslmode' => env('DB_SSL_MODE', 'prefer'),
  72. ],
  73. 'sqlsrv' => [
  74. 'driver' => 'sqlsrv',
  75. 'host' => env('DB_HOST', 'localhost'),
  76. 'port' => env('DB_PORT', 1433),
  77. 'database' => env('DB_DATABASE', 'forge'),
  78. 'username' => env('DB_USERNAME', 'forge'),
  79. 'password' => env('DB_PASSWORD', ''),
  80. 'charset' => env('DB_CHARSET', 'utf8'),
  81. 'prefix' => env('DB_PREFIX', ''),
  82. ],
  83. ],
  84. /*
  85. |--------------------------------------------------------------------------
  86. | Migration Repository Table
  87. |--------------------------------------------------------------------------
  88. |
  89. | This table keeps track of all the migrations that have already run for
  90. | your application. Using this information, we can determine which of
  91. | the migrations on disk haven't actually been run in the database.
  92. |
  93. */
  94. 'migrations' => 'migrations',
  95. /*
  96. |--------------------------------------------------------------------------
  97. | Redis Databases
  98. |--------------------------------------------------------------------------
  99. |
  100. | Redis is an open source, fast, and advanced key-value store that also
  101. | provides a richer set of commands than a typical key-value systems
  102. | such as APC or Memcached. Laravel makes it easy to dig right in.
  103. |
  104. */
  105. 'redis' => [
  106. 'client' => env('REDIS_CLIENT', 'phpredis'),
  107. 'cluster' => env('REDIS_CLUSTER', false),
  108. 'default' => [
  109. 'host' => env('REDIS_HOST', '127.0.0.1'),
  110. 'password' => env('REDIS_PASSWORD', null),
  111. 'port' => env('REDIS_PORT', 6379),
  112. 'database' => env('REDIS_DB', 0),
  113. ],
  114. 'cache' => [
  115. 'host' => env('REDIS_HOST', '127.0.0.1'),
  116. 'password' => env('REDIS_PASSWORD', null),
  117. 'port' => env('REDIS_PORT', 6379),
  118. 'database' => env('REDIS_CACHE_DB', 1),
  119. ],
  120. ],
  121. ];