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

Commit 19e29ac

Browse files
committed
Use singleton method
The `bindShared()` method was deprecated in Laravel 5.1 and removed in 5.2: https://laravel.com/docs/5.2/upgrade#upgrade-5.1.0 The `singleton()` method should be used instead.
1 parent 0a326bf commit 19e29ac

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)