How can we destroy the session variable in twig?
I can get session variables by app.session.get(‘$name’).
And I want to destroy it afterwards for some purposes.
Thanx!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Flash Messages are the right way to do this.
Symfony2 Cookbook example:
For more information check the Symfony documentation flash messages.