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

AttilaSchuster's avatar

Customize Login for Individual Session Timelife (Laravel 5.8)

Hi, I'am a Laravel Newbie and I need some help.

I have the task to set individual session lifetime for every user who wants to set it by a option field in login form.

At the moment i find a solution, but for every user, with a middleware to set config(['session.lifetime'....]) before session .

I had the hope, that in the $request are the login form requests, but after login the request is empty. Is there a way to get this data after login in the middleware i use, before a session is created??

Thanks Attila

0 likes
1 reply

Please or to participate in this conversation.