paranoid paranoid - 6 months ago 266
PHP Question

Get online users in laravel

I have one user for login to demo of my script.

I want get how many people online now.

I use

laravel 5.2


What am I do?

Answer

You could keep sessions in a DB and use last_activity column to determine how many users are currently online.

https://laravel.com/docs/5.1/session#introduction