laravel/framework — pull request #2609 by franzliedke (2013-10-31 13:29:18+00:00)
Title: Make extend() return manager instance.

Related to #2608. Turning code like this:

$this->app->extend('auth', function($auth, $app)
{
$auth->extend('fluxbb1', function($app)
{
$connector = $app['fluxbb1.db.connector'];
$provider = new UserProvider($connector->connection());

return new Guard($provider, $app['fluxbb1.cookie.storage']);
});
return $auth;
});

Into this:

$this->app->extend('auth', function($auth, $app)
{
return $auth->extend('fluxbb1', function($app)
{
$connector = $app['fluxbb1.db.connector'];
$provider = new UserProvider($connector->connection());

return new Guard($provider, $app['fluxbb1.cookie.storage']);
});
});

Resulting in less boilerplate when extending container bindings.