2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
2018-03-20 09:50:40 +08:00
|
|
|
'fetch' => PDO::FETCH_ASSOC,
|
|
|
|
'default' => env('DB_CONNECTION', 'mysql'),
|
2017-06-09 02:28:26 +08:00
|
|
|
'connections' => [
|
2018-08-27 00:40:04 +08:00
|
|
|
'mysql' => [
|
|
|
|
'driver' => 'mysql',
|
|
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
|
|
'port' => env('DB_PORT', 3306),
|
|
|
|
'database' => env('DB_DATABASE', ''),
|
|
|
|
'username' => env('DB_USERNAME', ''),
|
|
|
|
'password' => env('DB_PASSWORD', ''),
|
2017-12-15 06:38:29 +08:00
|
|
|
//'unix_socket' => env('DB_SOCKET', ''),
|
2020-02-29 07:56:01 +08:00
|
|
|
'prefix' => env('DB_PREFIX', ''),
|
|
|
|
'prefix_indexes' => true,
|
|
|
|
'timezone' => '+00:00',
|
|
|
|
'charset' => 'utf8',
|
|
|
|
'collation' => 'utf8_unicode_ci',
|
|
|
|
'strict' => false,
|
|
|
|
'engine' => null,
|
|
|
|
'options' => [
|
2018-01-30 04:48:11 +08:00
|
|
|
PDO::ATTR_EMULATE_PREPARES => env('DB_EMULATE_PREPARES', false),
|
2018-08-27 00:40:04 +08:00
|
|
|
//PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
2018-01-10 12:27:37 +08:00
|
|
|
],
|
2019-08-31 03:59:17 +08:00
|
|
|
'dump' => [
|
|
|
|
'timeout' => 60 * 5, // 5 minute timeout
|
|
|
|
],
|
2017-06-09 11:53:04 +08:00
|
|
|
],
|
2018-08-27 00:40:04 +08:00
|
|
|
'sqlite' => [
|
2020-02-29 07:56:01 +08:00
|
|
|
'driver' => 'sqlite',
|
|
|
|
'database' => storage_path('db.sqlite'),
|
|
|
|
'timezone' => '+00:00',
|
|
|
|
'prefix' => '',
|
|
|
|
'prefix_indexes' => true,
|
2017-06-10 11:19:17 +08:00
|
|
|
],
|
2019-09-13 20:05:02 +08:00
|
|
|
'testing' => [
|
2020-02-29 07:56:01 +08:00
|
|
|
'driver' => 'sqlite',
|
|
|
|
'database' => storage_path('testing.sqlite'),
|
|
|
|
'timezone' => '+00:00',
|
|
|
|
'prefix' => '',
|
|
|
|
'prefix_indexes' => true,
|
2017-06-10 11:19:17 +08:00
|
|
|
],
|
2018-08-27 00:40:04 +08:00
|
|
|
'memory' => [
|
2020-02-29 07:56:01 +08:00
|
|
|
'driver' => 'sqlite',
|
|
|
|
'database' => ':memory:',
|
|
|
|
'timezone' => '+00:00',
|
|
|
|
'prefix' => '',
|
|
|
|
'prefix_indexes' => true,
|
2017-06-10 11:19:17 +08:00
|
|
|
],
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
'migrations' => 'migrations',
|
|
|
|
|
|
|
|
'redis' => [
|
|
|
|
'cluster' => false,
|
2019-09-13 20:05:02 +08:00
|
|
|
'client' => 'phpredis',
|
2017-06-09 02:28:26 +08:00
|
|
|
'default' => [
|
2018-03-20 09:50:40 +08:00
|
|
|
'host' => env('REDIS_HOST', 'localhost'),
|
2018-01-30 04:48:11 +08:00
|
|
|
'password' => env('REDIS_PASSWORD', null),
|
2018-03-20 09:50:40 +08:00
|
|
|
'port' => env('REDIS_PORT', 6379),
|
2018-01-30 04:48:11 +08:00
|
|
|
'database' => env('REDIS_DATABASE', 1),
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
2019-09-13 20:05:02 +08:00
|
|
|
'cache' => [
|
|
|
|
'url' => env('REDIS_URL'),
|
|
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
|
|
'password' => env('REDIS_PASSWORD', null),
|
|
|
|
'port' => env('REDIS_PORT', 6379),
|
|
|
|
'database' => env('REDIS_CACHE_DB', 1),
|
|
|
|
],
|
2018-08-27 00:40:04 +08:00
|
|
|
],
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|