Get count of current online users
Hi,
I'm trying to create a stats widget that shows me the number of users currently connected to the filament platform. Do you have any idea how to do this?
Thanks for your help !
6 Replies
You can't out of the box for just filament. You would need to have a table to store the users sessions, then it's if you are having filament users and other users? If filament users, then on login I would say you need to store them in a sessions table and make a job to clean them out after X time of inactivity
I just have users for filament, but ok I see what you mean, thanks.
You would want to put a polling livewire component on the admin panel to update the activity of the session. Or on requests
I'll try to do that on the requests, otherwise I'll find a solution π
No problem, Jetstream has a sessions table and you could look at how that was implemented
I'll check it out, thanks !