Skip to content

Commit

Permalink
fix connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
pvsaintpe committed Jul 16, 2019
1 parent 7d193d1 commit bf0c485
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/UmbrellioPostgresProvider.php
Expand Up @@ -37,6 +37,9 @@ public function boot()
self::registerExtensions();
}

/**
* @codeCoverageIgnore
*/
protected function registerConnectionServices(): void
{
$this->app->singleton('db.factory', function ($app) {
Expand All @@ -46,6 +49,10 @@ protected function registerConnectionServices(): void
$this->app->singleton('db', function ($app) {
return new DatabaseManager($app, $app['db.factory']);
});

$this->app->bind('db.connection', function ($app) {
return $app['db']->connection();
});
}

/**
Expand Down

0 comments on commit bf0c485

Please sign in to comment.