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, is immediately removed from the session, which is useful for displaying error messages on certain requests. >
I can do this in frameworks like Laravel and CakePHP, but how could I do this in Silex?
I need to store a value as a session flash to display it after a redirect, using the Silex microframework, but I do not 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');
});