Skip to content

Commit 266be12

Browse files
committed
Tweak service provider code style
1 parent 96be808 commit 266be12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Jenssegers/Mongodb/MongodbServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class MongodbServiceProvider extends ServiceProvider {
1414
public function boot()
1515
{
1616
Model::setConnectionResolver($this->app['db']);
17+
1718
Model::setEventDispatcher($this->app['events']);
1819
}
1920

@@ -24,8 +25,10 @@ public function boot()
2425
*/
2526
public function register()
2627
{
27-
// Add a mongodb extension to the original database manager
28-
$this->app->resolving('db', function($db) {
28+
// Add a mongodb extension to the original database manager,
29+
// when the database instance is being resolved.
30+
$this->app->resolving('db', function($db)
31+
{
2932
$db->extend('mongodb', function($config)
3033
{
3134
return new Connection($config);

0 commit comments

Comments
 (0)