Skip to content

delete or clear session in symfony 4.4

I am saving the current user s data in a session, I am using Symfony 4.4 I am getting and setting the data to the session variable this way

$session = $this->get('session');
$session->set('user', $user);

is there any way to clear and delete the session after logging out I tried


and deleting the session one by using remove and nothing happened




i randomly came across this and it works just fine

User contributions licensed under: CC BY-SA
10 People found this is helpful