Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 500 Bytes

readme.MD

File metadata and controls

20 lines (13 loc) · 500 Bytes

#WebX-Routes Session Provides session functionality to the WebX Routes framework

##How to install In your Routes project in the bootstrap action:

Minimum Routes version 0.6.0

use WebX\Routes\Session\Api\Session;

RoutesBootstrap::run([function(Routes $routes, Session $session, Response $response) {
    $count = ($session->data("count") ?: 0) + 1;
    $response->typeJson(["count"=>$count]);
    $session->setData("count",$count);
},"../vendor/webx/routes-session/config/routes"]);