Skip to content

Commit

Permalink
Add a container alias for the redis connection instance. (#17722)
Browse files Browse the repository at this point in the history
Signed-off-by: Hunter Skrasek <hunterskrasek@me.com>
  • Loading branch information
hskrasek authored and taylorotwell committed Feb 2, 2017
1 parent 16ec6db commit b7db848
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Redis/RedisServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public function register()

return new RedisManager(Arr::pull($config, 'client', 'predis'), $config);
});

$this->app->bind('redis.connection', function ($app) {
return $app['redis']->connection();
});
}

/**
Expand All @@ -35,6 +39,6 @@ public function register()
*/
public function provides()
{
return ['redis'];
return ['redis', 'redis.connection'];
}
}

0 comments on commit b7db848

Please sign in to comment.