Slim Frameworks variable between routes

1

How to pass result from one route to another in Slim Frameworks

ex:

$app->get('/rota1/:param', function($param) use ($app, $myclass) {
    // rotina que retornará um array
    $myArr = $myclass->method($param);
});

$app->get('/rota2', function() use ($app) {
    // rotina para processar o array da rota1
    print_r($myArr);
});
    
asked by anonymous 23.10.2015 / 18:38

0 answers