Eloquent model for Redis

Solution:

There is redis support for Laravel

First you should install redis server and start it as service.

config/database.php

'redis' => [

    'cluster' => false,

    'default' => [
        'host'     => '127.0.0.1',
        'port'     => 6379,
        'database' => 0,
    ],

],

Usage example:

\Cache::store('redis')->get('key', 'value', 10);
\Cache::store('redis')->get('key');

Official Documentation: https://laravel.com/docs/5.1/redis