Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 465 Bytes

File metadata and controls

20 lines (16 loc) · 465 Bytes

slimphp-redis-session-middleware

Middleware to use Redis as your PHP Session store in SlimPHP

use

$app->add($session = new Slim_Middleware_SessionRedis(array(
					'expires'=>3600,
					'sessionid'=>$_COOKIE['session_cookie_name'],
					'name'=>'session_cookie_name')));

$app->get('/', function()
use ($app, $session){
	// this will be saved in redis
	$_SESSION['key'] = 'value';
});