PHP code example of ehann / laravel-redis-store

1. Go to this page and download the library: Download ehann/laravel-redis-store library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ehann / laravel-redis-store example snippets


public function boot()
{
    Cache::extend('ehann-redis', function ($app) {
        return Cache::repository(new \Ehann\Cache\RedisStore(
            $app['redis'],
            $app['config']['cache.prefix'],
            $app['config']['cache.stores.redis.connection']
        ));
    });
}

'stores' => [
    'redis' => [
        'driver' => 'ehann-redis',
    ],
],