From 64d1d73d70a45b929a818a0465616295d7834080 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 28 Mar 2015 09:17:29 +0000 Subject: [PATCH] Use env to determine the DB_DRIVER --- config/database.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/config/database.php b/config/database.php index 846e426c..df31a05e 100644 --- a/config/database.php +++ b/config/database.php @@ -26,7 +26,7 @@ return [ | */ - 'default' => 'mysql', + 'default' => env('DB_DRIVER', 'sqlite'), /* |-------------------------------------------------------------------------- @@ -54,10 +54,10 @@ return [ 'mysql' => [ 'driver' => 'mysql', - 'host' => env('DB_HOST', 'localhost'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'host' => env('DB_HOST', null), + 'database' => env('DB_DATABASE', null), + 'username' => env('DB_USERNAME', null), + 'password' => env('DB_PASSWORD', null), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', @@ -66,10 +66,10 @@ return [ 'pgsql' => [ 'driver' => 'pgsql', - 'host' => env('DB_HOST', 'localhost'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'host' => env('DB_HOST', null), + 'database' => env('DB_DATABASE', null), + 'username' => env('DB_USERNAME', null), + 'password' => env('DB_PASSWORD', null), 'charset' => 'utf8', 'prefix' => '', 'schema' => 'public', @@ -77,10 +77,10 @@ return [ 'sqlsrv' => [ 'driver' => 'sqlsrv', - 'host' => env('DB_HOST', 'localhost'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), + 'host' => env('DB_HOST', null), + 'database' => env('DB_DATABASE', null), + 'username' => env('DB_USERNAME', null), + 'password' => env('DB_PASSWORD', null), 'prefix' => '', ],