database.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. define('IN_IA',true);
  3. require_once public_path() . '/../../../data/config.php';
  4. return [
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Default Database Connection Name
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here you may specify which of the database connections below you wish
  11. | to use as your default connection for all database work. Of course
  12. | you may use many connections at once using the Database library.
  13. |
  14. */
  15. 'default' => env('DB_CONNECTION', 'mysql'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Database Connections
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here are each of the database connections setup for your application.
  22. | Of course, examples of configuring each database platform that is
  23. | supported by Laravel is shown below to make development simple.
  24. |
  25. |
  26. | All database work in Laravel is done through the PHP PDO facilities
  27. | so make sure you have the driver for your particular database of
  28. | choice installed on your machine before you begin development.
  29. |
  30. */
  31. 'connections' => [
  32. 'sqlite' => [
  33. 'driver' => 'sqlite',
  34. 'database' => env('DB_DATABASE', database_path('database.sqlite')),
  35. 'prefix' => '',
  36. ],
  37. 'mysql' => [
  38. 'driver' => 'mysql',
  39. 'host' => $config['db']['master']['host'],
  40. 'port' => $config['db']['master']['port'],
  41. 'database' => $config['db']['master']['database'],
  42. 'username' => $config['db']['master']['username'],
  43. 'password' => $config['db']['master']['password'],
  44. 'unix_socket' => env('DB_SOCKET', ''),
  45. 'charset' => 'utf8mb4',
  46. 'collation' => 'utf8mb4_unicode_ci',
  47. 'prefix' => 'fanyun_',
  48. 'strict' => false,
  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. 'schema' => 'public',
  61. 'sslmode' => 'prefer',
  62. ],
  63. ],
  64. /*
  65. |--------------------------------------------------------------------------
  66. | Migration Repository Table
  67. |--------------------------------------------------------------------------
  68. |
  69. | This table keeps track of all the migrations that have already run for
  70. | your application. Using this information, we can determine which of
  71. | the migrations on disk haven't actually been run in the database.
  72. |
  73. */
  74. 'migrations' => 'migrations',
  75. /*
  76. |--------------------------------------------------------------------------
  77. | Redis Databases
  78. |--------------------------------------------------------------------------
  79. |
  80. | Redis is an open source, fast, and advanced key-value store that also
  81. | provides a richer set of commands than a typical key-value systems
  82. | such as APC or Memcached. Laravel makes it easy to dig right in.
  83. |
  84. */
  85. 'redis' => [
  86. 'client' => 'predis',
  87. 'default' => [
  88. 'host' => env('REDIS_HOST', '127.0.0.1'),
  89. 'password' => env('REDIS_PASSWORD', null),
  90. 'port' => env('REDIS_PORT', 6379),
  91. 'database' => 0,
  92. ],
  93. ],
  94. ];