F
Filamentβ€’14mo ago
Hugo

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 !
No description
6 Replies
toeknee
toekneeβ€’14mo ago
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
Hugo
HugoOPβ€’14mo ago
I just have users for filament, but ok I see what you mean, thanks.
toeknee
toekneeβ€’14mo ago
You would want to put a polling livewire component on the admin panel to update the activity of the session. Or on requests
Hugo
HugoOPβ€’14mo ago
I'll try to do that on the requests, otherwise I'll find a solution πŸ™‚
toeknee
toekneeβ€’14mo ago
No problem, Jetstream has a sessions table and you could look at how that was implemented
Hugo
HugoOPβ€’14mo ago
I'll check it out, thanks !
Want results from more Discord servers?
Add your server