database.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?php
  2. use Illuminate\Support\Str;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Default Database Connection Name
  7. |--------------------------------------------------------------------------
  8. |
  9. | Here you may specify which of the database connections below you wish
  10. | to use as your default connection for all database work. Of course
  11. | you may use many connections at once using the Database library.
  12. |
  13. */
  14. 'default' => env('DB_CONNECTION', 'mysql'),
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Database Connections
  18. |--------------------------------------------------------------------------
  19. |
  20. | Here are each of the database connections setup for your application.
  21. | Of course, examples of configuring each database platform that is
  22. | supported by Laravel is shown below to make development simple.
  23. |
  24. |
  25. | All database work in Laravel is done through the PHP PDO facilities
  26. | so make sure you have the driver for your particular database of
  27. | choice installed on your machine before you begin development.
  28. |
  29. */
  30. 'connections' => [
  31. 'sqlite' => [
  32. 'driver' => 'sqlite',
  33. 'url' => env('DATABASE_URL'),
  34. 'database' => env('DB_DATABASE', database_path('database.sqlite')),
  35. 'prefix' => '',
  36. 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
  37. ],
  38. 'mysql' => [
  39. 'driver' => 'mysql',
  40. 'url' => env('DATABASE_URL'),
  41. 'host' => env('DB_HOST', '127.0.0.1'),
  42. 'port' => env('DB_PORT', '3306'),
  43. 'database' => env('DB_DATABASE', 'forge'),
  44. 'username' => env('DB_USERNAME', 'forge'),
  45. 'password' => env('DB_PASSWORD', ''),
  46. 'unix_socket' => env('DB_SOCKET', ''),
  47. 'charset' => 'utf8mb4',
  48. 'collation' => 'utf8mb4_unicode_ci',
  49. 'prefix' => '',
  50. 'prefix_indexes' => true,
  51. 'strict' => false,
  52. 'engine' => null,
  53. 'options' => extension_loaded('pdo_mysql') ? array_filter([
  54. PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
  55. ]) : [],
  56. ],
  57. 'was_test' => [
  58. 'driver' => 'mysql',
  59. 'host' => '101.133.135.193',
  60. 'port' => '13306',
  61. 'database' => 'bswas_test',
  62. 'username' => 'bswas_test',
  63. 'password' => '123456',
  64. 'unix_socket' => '',
  65. 'charset' => 'utf8mb4',
  66. 'collation' => 'utf8mb4_unicode_ci',
  67. 'prefix' => '',
  68. 'strict' => false,
  69. 'engine' => null,
  70. ],
  71. 'mysql_haiRobotics' => [
  72. 'driver' => 'mysql',
  73. 'host' => '58.33.243.164',
  74. 'port' => '3306',
  75. 'database' => 'wms_core',
  76. 'username' => 'root',
  77. 'password' => 'root',
  78. 'unix_socket' => '',
  79. 'charset' => 'utf8mb4',
  80. 'collation' => 'utf8mb4_unicode_ci',
  81. 'prefix' => '',
  82. 'strict' => false,
  83. 'engine' => null,
  84. ],
  85. 'mysql_haiRobotics_ess' => [
  86. 'driver' => 'mysql',
  87. 'host' => '58.33.243.164',
  88. 'port' => '3306',
  89. 'database' => 'wms_ess',
  90. 'username' => 'root',
  91. 'password' => 'root',
  92. 'unix_socket' => '',
  93. 'charset' => 'utf8mb4',
  94. 'collation' => 'utf8mb4_unicode_ci',
  95. 'prefix' => '',
  96. 'strict' => false,
  97. 'engine' => null,
  98. ],
  99. 'oracle' => [
  100. 'driver' => env('ORACLE_DRIVER', 'oracle'),
  101. 'host' => env('ORACLE_HOST', '47.103.12.61'),
  102. 'port' => env('ORACLE_PORT', '1521'),
  103. 'database'=> env('ORACLE_DATABASE', ''),
  104. 'service_name' => env('ORACLE_SERVICE_NAME', 'orcl'),
  105. 'username' => env('ORACLE_USERNAME', 'WMS_USER'),
  106. 'password' => env('ORACLE_PASSWORD', 'WMS_USER'),
  107. 'charset' => env('ORACLE_CHARSET', 'utf8'),
  108. 'prefix' => env('ORACLE_PREFIX', ''),
  109. ],
  110. 'erp' => [
  111. 'driver' => env('ERP_CONNECTION', 'mysql'),
  112. 'host' => env('ERP_HOST', 'erp.baoshi56.com'),
  113. 'port' => env('ERP_PORT', '3306'),
  114. 'database'=> env('ERP_DATABASE', 'purch'),
  115. 'username' => env('ERP_USERNAME', 'root'),
  116. 'password' => env('ERP_PASSWORD', 'root'),
  117. 'charset' => env('ERP_CHARSET', 'utf8'),
  118. 'prefix' => env('ERP_PREFIX', ''),
  119. ],
  120. 'pgsql' => [
  121. 'driver' => 'pgsql',
  122. 'url' => env('DATABASE_URL'),
  123. 'host' => env('DB_HOST', '127.0.0.1'),
  124. 'port' => env('DB_PORT', '5432'),
  125. 'database' => env('DB_DATABASE', 'forge'),
  126. 'username' => env('DB_USERNAME', 'forge'),
  127. 'password' => env('DB_PASSWORD', ''),
  128. 'charset' => 'utf8',
  129. 'prefix' => '',
  130. 'prefix_indexes' => true,
  131. 'schema' => 'public',
  132. 'sslmode' => 'prefer',
  133. ],
  134. 'sqlsrv' => [
  135. 'driver' => 'sqlsrv',
  136. 'url' => env('DATABASE_URL'),
  137. 'host' => env('DB_HOST', 'localhost'),
  138. 'port' => env('DB_PORT', '1433'),
  139. 'database' => env('DB_DATABASE', 'forge'),
  140. 'username' => env('DB_USERNAME', 'forge'),
  141. 'password' => env('DB_PASSWORD', ''),
  142. 'charset' => 'utf8',
  143. 'prefix' => '',
  144. 'prefix_indexes' => true,
  145. ],
  146. ],
  147. /*
  148. |--------------------------------------------------------------------------
  149. | Migration Repository Table
  150. |--------------------------------------------------------------------------
  151. |
  152. | This table keeps track of all the migrations that have already run for
  153. | your application. Using this information, we can determine which of
  154. | the migrations on disk haven't actually been run in the database.
  155. |
  156. */
  157. 'migrations' => 'migrations',
  158. /*
  159. |--------------------------------------------------------------------------
  160. | Redis Databases
  161. |--------------------------------------------------------------------------
  162. |
  163. | Redis is an open source, fast, and advanced key-value store that also
  164. | provides a richer body of commands than a typical key-value system
  165. | such as APC or Memcached. Laravel makes it easy to dig right in.
  166. |
  167. */
  168. 'redis' => [
  169. 'client' => env('REDIS_CLIENT', 'predis'),
  170. 'options' => [
  171. 'cluster' => env('REDIS_CLUSTER', 'predis'),
  172. 'prefix' => '',//Str::slug(env('APP_NAME', 'laravel'), '_').'_database_',
  173. ],
  174. 'default' => [
  175. 'url' => env('REDIS_URL'),
  176. 'host' => env('REDIS_HOST', '127.0.0.1'),
  177. 'password' => env('REDIS_PASSWORD', null),
  178. 'port' => env('REDIS_PORT', 6379),
  179. 'database' => env('REDIS_DB', 0),
  180. ],
  181. 'cache' => [
  182. 'url' => env('REDIS_URL'),
  183. 'host' => env('REDIS_HOST', '127.0.0.1'),
  184. 'password' => env('REDIS_PASSWORD', null),
  185. 'port' => env('REDIS_PORT', 6379),
  186. 'database' => env('REDIS_CACHE_DB', 1),
  187. ],
  188. ],
  189. ];