How can we destroy session variables in a twig? I can get session variables by app.session.get ('$ name') and I want to delete it later for some purposes.
Thanax!
Flash message is the right way to do this.
Symfony2 cookbook example:
{% if app.session.hasFlash ('notice')%} and Check Symfony documentation for more information.
Comments
Post a Comment