Variable Slim Frameworks between Routes

Asked

Viewed 392 times

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);
});
  • I think just by GET, POST, COOKIE or SESSION?

  • Yes, string not so long is possible with URL For

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.