cleanup for db config

This commit is contained in:
Nabeel Shahzad
2017-12-06 14:00:35 -06:00
parent 8cc3dd6608
commit f95e07dbcc
2 changed files with 6 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ APP_LOG_LEVEL=debug
APP_LOG_MAX_FILES=7 APP_LOG_MAX_FILES=7
DB_CONNECTION=sqlite DB_CONNECTION=sqlite
DB_PATH=storage/dev.sqlite DB_DATABASE=storage/dev.sqlite
CACHE_DRIVER=array CACHE_DRIVER=array
CACHE_PREFIX= CACHE_PREFIX=

View File

@@ -4,47 +4,41 @@ return [
'fetch' => PDO::FETCH_ASSOC, 'fetch' => PDO::FETCH_ASSOC,
'default' => env('DB_CONNECTION', 'local'), 'default' => env('DB_CONNECTION', 'local'),
'connections' => [ 'connections' => [
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'phpvms'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'phpvms'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', 'phpvms'), 'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'collation' => 'utf8_unicode_ci', 'collation' => 'utf8_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => true, 'strict' => true,
'engine' => null, 'engine' => null,
], ],
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => env('DB_PATH', storage_path('db.sqlite')), 'database' => env('DB_DATABASE', storage_path('db.sqlite')),
'prefix' => '', 'prefix' => '',
], ],
'local' => [ 'local' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => storage_path('local.sqlite'), 'database' => storage_path('local.sqlite'),
'prefix' => '', 'prefix' => '',
], ],
'unittest' => [ 'unittest' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => storage_path('unittest.sqlite'), 'database' => storage_path('unittest.sqlite'),
'prefix' => '', 'prefix' => '',
], ],
'memory' => [ 'memory' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => ':memory:', 'database' => ':memory:',
'prefix' => '', 'prefix' => '',
], ],
], ],
'migrations' => 'migrations', 'migrations' => 'migrations',