2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
2017-06-25 01:59:07 +08:00
|
|
|
'fetch' => PDO::FETCH_ASSOC,
|
2017-12-15 06:38:29 +08:00
|
|
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
2017-06-09 02:28:26 +08:00
|
|
|
'connections' => [
|
2017-06-09 11:53:04 +08:00
|
|
|
'mysql' => [
|
2017-06-09 02:28:26 +08:00
|
|
|
'driver' => 'mysql',
|
2017-07-14 02:45:59 +08:00
|
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
2017-06-09 02:28:26 +08:00
|
|
|
'port' => env('DB_PORT', '3306'),
|
2017-12-07 04:00:35 +08:00
|
|
|
'database' => env('DB_DATABASE', 'forge'),
|
|
|
|
'username' => env('DB_USERNAME', 'forge'),
|
|
|
|
'password' => env('DB_PASSWORD', ''),
|
2017-12-15 06:38:29 +08:00
|
|
|
//'unix_socket' => env('DB_SOCKET', ''),
|
|
|
|
'prefix' => env('DB_PREFIX', ''),
|
2017-12-10 22:47:03 +08:00
|
|
|
'timezone' => '+00:00',
|
2017-06-09 02:28:26 +08:00
|
|
|
'charset' => 'utf8',
|
|
|
|
'collation' => 'utf8_unicode_ci',
|
2017-12-15 06:38:29 +08:00
|
|
|
'strict' => false,
|
2017-06-09 02:28:26 +08:00
|
|
|
'engine' => null,
|
2017-06-09 11:53:04 +08:00
|
|
|
],
|
2017-12-05 05:35:39 +08:00
|
|
|
'sqlite' => [
|
|
|
|
'driver' => 'sqlite',
|
2017-12-15 06:38:29 +08:00
|
|
|
'database' => storage_path('db.sqlite'),
|
2017-12-10 22:47:03 +08:00
|
|
|
'timezone' => '+00:00',
|
2017-06-10 11:19:17 +08:00
|
|
|
'prefix' => '',
|
|
|
|
],
|
|
|
|
'unittest' => [
|
|
|
|
'driver' => 'sqlite',
|
2017-08-18 03:01:47 +08:00
|
|
|
'database' => storage_path('unittest.sqlite'),
|
2017-12-10 22:47:03 +08:00
|
|
|
'timezone' => '+00:00',
|
2017-06-10 11:19:17 +08:00
|
|
|
'prefix' => '',
|
|
|
|
],
|
2017-12-07 01:25:41 +08:00
|
|
|
'memory' => [
|
2017-06-10 11:19:17 +08:00
|
|
|
'driver' => 'sqlite',
|
|
|
|
'database' => ':memory:',
|
2017-12-10 22:47:03 +08:00
|
|
|
'timezone' => '+00:00',
|
2017-06-10 11:19:17 +08:00
|
|
|
'prefix' => '',
|
|
|
|
],
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
'migrations' => 'migrations',
|
|
|
|
|
|
|
|
'redis' => [
|
|
|
|
'cluster' => false,
|
|
|
|
'default' => [
|
|
|
|
'host' => env('REDIS_HOST', 'localhost'),
|
|
|
|
'password' => env('REDIS_PASSWORD', null),
|
|
|
|
'port' => env('REDIS_PORT', 6379),
|
2017-12-15 06:38:29 +08:00
|
|
|
'database' => env('REDIS_DATABASE', 1),
|
2017-06-09 02:28:26 +08:00
|
|
|
],
|
2017-12-07 01:37:59 +08:00
|
|
|
]
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|