Fix install (#8724)

Don't try to connect to the database if it isn't configured yet.
This commit is contained in:
Tony Murray
2018-05-16 07:11:28 -05:00
committed by GitHub
parent 0448c9ecae
commit b881cbe825

View File

@@ -20,9 +20,10 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
// connect legacy db
// connect legacy db, only if configured
//FIXME this is for auth right now, remove later
$db_config = config('database.connections')[config('database.default')];
if (!empty($db_config['database'])) {
dbConnect(
$db_config['host'],
$db_config['username'],
@@ -31,6 +32,7 @@ class AppServiceProvider extends ServiceProvider
$db_config['port'],
$db_config['unix_socket']
);
}
// load config
Config::load();