database.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
  35. ],
  36. 'mysql' => [
  37. 'driver' => 'mysql',
  38. 'host' => env('DB_HOST', '127.0.0.1'),
  39. 'port' => env('DB_PORT', '3306'),
  40. 'database' => env('DB_DATABASE', 'forge'),
  41. 'username' => env('DB_USERNAME', 'forge'),
  42. 'password' => env('DB_PASSWORD', ''),
  43. 'unix_socket' => env('DB_SOCKET', ''),
  44. 'charset' => 'utf8mb4',
  45. 'collation' => 'utf8mb4_unicode_ci',
  46. 'prefix' => '',
  47. 'prefix_indexes' => true,
  48. 'strict' => true,
  49. 'engine' => null,
  50. ],
  51. 'pgsql' => [
  52. 'driver' => 'pgsql',
  53. 'host' => env('DB_HOST', '127.0.0.1'),
  54. 'port' => env('DB_PORT', '5432'),
  55. 'database' => env('DB_DATABASE', 'forge'),
  56. 'username' => env('DB_USERNAME', 'forge'),
  57. 'password' => env('DB_PASSWORD', ''),
  58. 'charset' => 'utf8',
  59. 'prefix' => '',
  60. 'prefix_indexes' => true,
  61. 'schema' => 'public',
  62. 'sslmode' => 'prefer',
  63. ],
  64. 'sqlsrv' => [
  65. 'driver' => 'sqlsrv',
  66. 'host' => env('DB_HOST', 'localhost'),
  67. 'port' => env('DB_PORT', '1433'),
  68. 'database' => env('DB_DATABASE', 'forge'),
  69. 'username' => env('DB_USERNAME', 'forge'),
  70. 'password' => env('DB_PASSWORD', ''),
  71. 'charset' => 'utf8',
  72. 'prefix' => '',
  73. 'prefix_indexes' => true,
  74. ],
  75. 'rank' => [
  76. 'driver' => 'mysql',
  77. 'host' => '8.210.59.52',
  78. 'port' => '3306',
  79. // 'database' => 'sdb_rank',
  80. 'database' => 'sep_analytics',
  81. 'username' => 'yql_1001',
  82. 'password' => 'testyql',
  83. 'charset' => 'utf8',
  84. 'prefix' => 'scn_',
  85. ],
  86. 'local' => [
  87. 'driver' => 'mysql',
  88. 'host' => '127.0.0.1',
  89. 'port' => '3306',
  90. // 'database' => 'sdb_rank',
  91. 'database' => 'sep_analytics',
  92. 'username' => 'root',
  93. 'password' => 'root',
  94. 'charset' => 'utf8',
  95. 'prefix' => 'scn_',
  96. ],
  97. 'template' => [
  98. 'driver' => 'mysql',
  99. 'host' => env('DB_HOST', '127.0.0.1'),
  100. 'port' => env('DB_PORT', '3306'),
  101. 'database' => env('DB_DATABASE', 'forge'),
  102. 'username' => env('DB_USERNAME', 'forge'),
  103. 'password' => env('DB_PASSWORD', ''),
  104. 'charset' => 'utf8',
  105. 'prefix' => '',
  106. ],
  107. ],
  108. /*
  109. |--------------------------------------------------------------------------
  110. | Migration Repository Table
  111. |--------------------------------------------------------------------------
  112. |
  113. | This table keeps track of all the migrations that have already run for
  114. | your application. Using this information, we can determine which of
  115. | the migrations on disk haven't actually been run in the database.
  116. |
  117. */
  118. 'migrations' => 'migrations',
  119. /*
  120. |--------------------------------------------------------------------------
  121. | Redis Databases
  122. |--------------------------------------------------------------------------
  123. |
  124. | Redis is an open source, fast, and advanced key-value store that also
  125. | provides a richer body of commands than a typical key-value system
  126. | such as APC or Memcached. Laravel makes it easy to dig right in.
  127. |
  128. */
  129. 'redis' => [
  130. 'client' => 'predis',
  131. 'default' => [
  132. 'host' => env('REDIS_HOST', '127.0.0.1'),
  133. 'password' => env('REDIS_PASSWORD', null),
  134. 'port' => env('REDIS_PORT', 6379),
  135. 'database' => env('REDIS_DB', 0),
  136. ],
  137. 'cache' => [
  138. 'host' => env('REDIS_HOST', '127.0.0.1'),
  139. 'password' => env('REDIS_PASSWORD', null),
  140. 'port' => env('REDIS_PORT', 6379),
  141. 'database' => env('REDIS_CACHE_DB', 1),
  142. ],
  143. ],
  144. ];