PHP code example of cnam / redis-service-provider
1. Go to this page and download the library: Download cnam/redis-service-provider 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/ */
cnam / redis-service-provider example snippets
$app['redis.options'] = [
'host' => 'redis',
'port' => 6379,
'timeout' => 0,
'dbname' => 'my_box',
'password' => 'qwerty'
];
$app->register(new Silex\Provider\RedisServiceProvider());
/**
* @var $redis \Redis
**/
$redis = $app['redis'];