public function boot()
    {
        Cache::extend('redis', function ($app, $config) {
            $store = new RedisStore(
                $app['redis'],
                Arr::get($config, 'prefix', $this->app['config']['cache.prefix']),
                Arr::get($config, 'connection', 'default')
            );

            $repository = new Repository($store);

            if ($app->bound('Illuminate\Contracts\Events\Dispatcher')) {
                $repository->setEventDispatcher(
                    $app['Illuminate\Contracts\Events\Dispatcher']
                );
            }

            return $repository;
        });
    }
public function boot()
    {
        Cache::extend('redis', function ($app, $config) {
            $store = new RedisStore(
                $app['redis'],
                Arr::get($config, 'prefix', $this->app['config']['cache.prefix']),
                Arr::get($config, 'connection', 'default')
            );

            $repository = new Repository($store);

            if ($app->bound('Illuminate\Contracts\Events\Dispatcher')) {
                $repository->setEventDispatcher(
                    $app['Illuminate\Contracts\Events\Dispatcher']
                );
            }

            return $repository;
        });
    }
public function boot ( ) { Cache :: extend ( 'redis' , function ( $ app , $ config ) { $ store = new RedisStore ( $ app [ 'redis' ] , Arr :: get ( $ config , 'prefix' , $ this -> app [ 'config' ] [ 'cache.prefix' ] ) , Arr :: get ( $ config , 'connection' , 'default' ) ) ; $ repository = new Repository ( $ store ) ; if ( $ app -> bound ( 'Illuminate\Contracts\Events\Dispatcher' ) ) { $ repository -> setEventDispatcher ( $ app [ 'Illuminate\Contracts\Events\Dispatcher' ] ) ; } return $ repository ; } ) ; }
Register custom Redis cache driver.

@return void
Register custom Redis cache driver .