/config/database.php

https://bitbucket.org/AlexeyPisklov/cryptoc · PHP · 138 lines · 73 code · 20 blank · 45 comment · 0 complexity · f9f53006417f53580b74092410e00d67 MD5 · raw file

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