Service provider that registers a Redis manager and default connection for the application.
// Source: https://github.com/laravel/framework | License: MIT | Copyright Taylor Otwell
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace Illuminate\Redis;
use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
class RedisServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->singleton('redis', function ($app) {
$config = $app->make('config')->get('database.redis', []);
return new RedisManager($app, Arr::pull($config, 'client', 'phpredis'), $config);
});
$this->app->bind('redis.connection', functi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key