Level 75
You can
$request->session()->regenerate();
prior to login.
You can redirect with something like:
return redirect('login')->with('status', $message);
Of course put your actual message into the variable.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a listener in which after a successful login into an Oracle, I have to switch to database user and run some scripts.
However, at this point, I like to flush out any sessions for this user and set session keys for this user. What is the best way of accomplish this?
Also, if the session has expired, how can I redirect the user to the login page. Thanks.
You can
$request->session()->regenerate();
prior to login.
You can redirect with something like:
return redirect('login')->with('status', $message);
Of course put your actual message into the variable.
Please or to participate in this conversation.