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

dipcb05's avatar

How to get the session data of each user.

i want to arrange some feature depends on user's session data. like. in message module, who is online now.

and i need to get information, user's total activity time in my site. so i need to get their session data.

user->id, user->ip, user->in_time, user->out_time, user->activity_time how to get it?

0 likes
1 reply
tisuchi's avatar

@dipcb05

Laravel doesn't store such kind of data automatically. If you really need to use these data, you have to set in session manually during logging of your user.

Please or to participate in this conversation.