I think Laravel solves this problem as well, but would like to extend my question a little bit.
Is it possible in Laravel to show how many users are currently logged in, in real time?
Like if the 10 users are logged then the counter should show 10 users are logged in. This will be shown to all the ten users , but in real time.
So if some users which logs out, counter should decrease.
The approach i used is like after attempting to login, we can increment the counter of the one of the column in DB. We can use another table, say logged in table.
When users are logged out, we would decrement the counter by deleting that Auth::id of the user and the count will get reduced.
But then i want to try it in a real time, how is that possible with laravel itself??