Level 75
Use session helper.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I'm using the built in Auth functionality and would like to store some session data after successful login (Time zone etc.). Is there any simple way to accomplish this?
Br, Joakim
The successful login event seems reasonable yes... in fact I'd probably say that's the "right" way to do it. Implement a listener and add your session data in the handle method...
namespace App\Listeners;
use Illuminate\Auth\Events\Login;
class PopulateSession
{
public function handle(Login $login)
{
// Populate your extra session data here
}
}
Please or to participate in this conversation.