Guest User

Untitled

a guest
Nov 4th, 2017
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. <?php
  2.  
  3. $url = parse_url(getenv("DATABASE_URL"));
  4.  
  5. $host = $url["host"];
  6. $username = $url["user"];
  7. $password = $url["pass"];
  8. $database = substr($url["path"], 1);
  9.  
  10. return [
  11.  
  12. /*
  13. |--------------------------------------------------------------------------
  14. | Default Database Connection Name
  15. |--------------------------------------------------------------------------
  16. |
  17. | Here you may specify which of the database connections below you wish
  18. | to use as your default connection for all database work. Of course
  19. | you may use many connections at once using the Database library.
  20. |
  21. */
  22.  
  23. 'default' => env('DB_CONNECTION', 'pgsql'),
  24.  
  25. /*
  26. |--------------------------------------------------------------------------
  27. | Database Connections
  28. |--------------------------------------------------------------------------
  29. |
  30. | Here are each of the database connections setup for your application.
  31. | Of course, examples of configuring each database platform that is
  32. | supported by Laravel is shown below to make development simple.
  33. |
  34. |
  35. | All database work in Laravel is done through the PHP PDO facilities
  36. | so make sure you have the driver for your particular database of
  37. | choice installed on your machine before you begin development.
  38. |
  39. */
  40.  
  41. 'connections' => [
  42.  
  43. 'sqlite' => [
  44. 'driver' => 'sqlite',
  45. 'database' => env('DB_DATABASE', database_path('database.sqlite')),
  46. 'prefix' => '',
  47. ],
  48.  
  49. 'mysql' => [
  50. 'driver' => 'mysql',
  51. 'host' => env('DB_HOST', 'ec2-50-16-202-213.compute-1.amazonaws.com'),
  52. 'port' => env('DB_PORT', '3306'),
  53. 'database' => env('DB_DATABASE', 'd4ko4qf9v29j55'),
  54. 'username' => env('DB_USERNAME', 'ffpjybcybpypio'),
  55. 'password' => env('DB_PASSWORD', 'f6e4f68316001d7ef551dc7627c3335592f8f7d811e80937bf6b51d25a63d4f4'),
  56. 'unix_socket' => env('DB_SOCKET', ''),
  57. 'charset' => 'utf8mb4',
  58. 'collation' => 'utf8mb4_unicode_ci',
  59. 'prefix' => '',
  60. 'strict' => true,
  61. 'engine' => null,
  62. ],
  63.  
  64. 'pgsql' => array(
  65. 'driver' => 'pgsql',
  66. 'host' => $host,
  67. 'database' => $database,
  68. 'username' => $username,
  69. 'password' => $password,
  70. 'charset' => 'utf8',
  71. 'prefix' => '',
  72. 'schema' => 'public',
  73. ),
  74.  
  75. 'sqlsrv' => [
  76. 'driver' => 'sqlsrv',
  77. 'host' => env('DB_HOST', 'localhost'),
  78. 'port' => env('DB_PORT', '1433'),
  79. 'database' => env('DB_DATABASE', 'forge'),
  80. 'username' => env('DB_USERNAME', 'forge'),
  81. 'password' => env('DB_PASSWORD', ''),
  82. 'charset' => 'utf8',
  83. 'prefix' => '',
  84. ],
  85.  
  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.  
  99. 'migrations' => 'migrations',
  100.  
  101. /*
  102. |--------------------------------------------------------------------------
  103. | Redis Databases
  104. |--------------------------------------------------------------------------
  105. |
  106. | Redis is an open source, fast, and advanced key-value store that also
  107. | provides a richer set of commands than a typical key-value systems
  108. | such as APC or Memcached. Laravel makes it easy to dig right in.
  109. |
  110. */
  111.  
  112. 'redis' => [
  113.  
  114. 'client' => 'predis',
  115.  
  116. 'default' => [
  117. 'host' => env('REDIS_HOST', '127.0.0.1'),
  118. 'password' => env('REDIS_PASSWORD', null),
  119. 'port' => env('REDIS_PORT', 6379),
  120. 'database' => 0,
  121. ],
  122.  
  123. ],
  124.  
  125. ];
Add Comment
Please, Sign In to add comment