1
Some frameworks have a feature called Session Flash, where it is possible to store a certain value in the session and when it is accessed, it is immediately removed from it, which is useful to show error messages in certain requests.
I know how to do it in frameworks like Laravel and Cakephp, but how could I do it in Silex?
I need to store a session flash value to display it after a redirect, using Silex microframework, but I don’t know how.
Sample code:
$app->get('/rota', function () use($app){
// Quero enviar "mensagem" com o valor "Cadastrado com sucesso aqui" num flash
return $app->redirect('/outra/rota');
});