Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tkaw220's avatar

Old Session Isn't Flushed with Session::regenerate

I am using file based Laravel session.

When running below code:

Session::forget('member');
Session::flush();
Session::regenerate();

The old session wasn't flush at all, all the data is still there. But the newly generated session start fresh.

How can I really flush the old session before moving to new session?

0 likes
0 replies

Please or to participate in this conversation.