database.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. 'mysql' => [
  31. 'driver' => 'mysql',
  32. 'host' => env('DB_HOST', '127.0.0.1'),
  33. 'port' => env('DB_PORT', '3306'),
  34. 'database' => env('DB_DATABASE', 'forge'),
  35. 'username' => env('DB_USERNAME', 'forge'),
  36. 'password' => env('DB_PASSWORD', ''),
  37. 'unix_socket' => env('DB_SOCKET', ''),
  38. 'charset' => 'utf8mb4',
  39. 'collation' => 'utf8mb4_unicode_ci',
  40. 'prefix' => '',
  41. 'strict' => true,
  42. 'engine' => null,
  43. 'options'=> [
  44. PDO::ATTR_PERSISTENT => true,
  45. ],
  46. ],
  47. ],
  48. /*
  49. |--------------------------------------------------------------------------
  50. | Migration Repository Table
  51. |--------------------------------------------------------------------------
  52. |
  53. | This table keeps track of all the migrations that have already run for
  54. | your application. Using this information, we can determine which of
  55. | the migrations on disk haven't actually been run in the database.
  56. |
  57. */
  58. 'migrations' => 'migrations',
  59. /*
  60. |--------------------------------------------------------------------------
  61. | Redis Databases
  62. |--------------------------------------------------------------------------
  63. |
  64. | Redis is an open source, fast, and advanced key-value store that also
  65. | provides a richer set of commands than a typical key-value systems
  66. | such as APC or Memcached. Laravel makes it easy to dig right in.
  67. |
  68. */
  69. 'redis' => [
  70. 'client' => 'predis',
  71. 'default' => [
  72. 'host' => env('REDIS_HOST', '127.0.0.1'),
  73. 'password' => env('REDIS_PASSWORD', null),
  74. 'port' => env('REDIS_PORT', 6379),
  75. 'database' => 0,
  76. ],
  77. ],
  78. ];