Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 45b5e51

Browse files
committed
Merge pull request #29 from jonnybarnes/patch-1
Use singleton method. Fixes #28
2 parents 0a326bf + 19e29ac commit 45b5e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DatabaseServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ public function register()
2020
// The connection factory is used to create the actual connection instances on
2121
// the database. We will inject the factory into the manager so that it may
2222
// make the connections while they are actually needed and not of before.
23-
$this->app->bindShared('db.factory', function ($app) {
23+
$this->app->singleton('db.factory', function ($app) {
2424
return new ConnectionFactory($app);
2525
});
2626

2727
// The database manager is used to resolve various connections, since multiple
2828
// connections might be managed. It also implements the connection resolver
2929
// interface which may be used by other components requiring connections.
30-
$this->app->bindShared('db', function ($app) {
30+
$this->app->singleton('db', function ($app) {
3131
return new DatabaseManager($app, $app['db.factory']);
3232
});
3333
}

0 commit comments

Comments
 (0)