Commit f39c67ae authored by Franz Liedke's avatar Franz Liedke

Only extend database when it is actually resolved.

parent 27b52063
......@@ -25,9 +25,11 @@ class MongodbServiceProvider extends ServiceProvider {
public function register()
{
// Add a mongodb extension to the original database manager
$this->app['db']->extend('mongodb', function($config)
{
return new Connection($config);
$this->app->resolving('db', function($db) {
$db->extend('mongodb', function($config)
{
return new Connection($config);
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment