Checking if a user is logged out might be tricky. What if they just close the browser tab? Or the session times out?
If you want to be sure of your data, I recommend websockets https://laravel.com/docs/9.x/broadcasting#introduction
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
What would be a good starting point to add a monitoring or logging feature? Things like viewing current online/active users, logins and so on?
Would you just take the data from the DB? (And for example for the current online users feature use the users table to determine if a user is online by adding a last_login and last_logout columns and query active users if login > logout?), or there are other ways to do it?
Please or to participate in this conversation.