laramit
3 years ago

Record last user activity time

Posted 3 years ago by laramit

I've been asked to record login and logout times for users of a Laravel 5 application.

Logins are easy enough to record but if a user session times out or the user just closes their browser instead of actually logging out then we don't know they've logged out.

Is there any way (I'm guessing in middleware?) of recording every user's last activity time? or is there a way of checking of open sessions in Laravel (or is that more at an nginx level?) to match against a user so when the session expires I can record them as logged out?

Thanks!

Please sign in or create an account to participate in this conversation.