From 232dbbfbbb590e0b4d2a1eeaec8c8ed0827887ac Mon Sep 17 00:00:00 2001 From: Phoenix Gao Date: Mon, 25 Jan 2016 10:37:51 +0800 Subject: [PATCH] Change deprecated $app->bindShared() to $app->singleton() --- src/DatabaseServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DatabaseServiceProvider.php b/src/DatabaseServiceProvider.php index 6dfcdbf..288423e 100644 --- a/src/DatabaseServiceProvider.php +++ b/src/DatabaseServiceProvider.php @@ -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']); }); }