You could use something like this.
Oct 26, 2015
2
Level 2
Record last user activity time
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!
Level 4
2 likes
Please or to participate in this conversation.