Skip to content

Commit

Permalink
Change deprecated $app->bindShared() to $app->singleton()
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixgao committed Jan 25, 2016
1 parent c8e7e46 commit 232dbbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DatabaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public function register()
// The connection factory is used to create the actual connection instances on
// the database. We will inject the factory into the manager so that it may
// make the connections while they are actually needed and not of before.
$this->app->bindShared('db.factory', function ($app) {
$this->app->singleton('db.factory', function ($app) {
return new ConnectionFactory($app);
});

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

0 comments on commit 232dbbf

Please sign in to comment.