How to create a list of online users?
Good evening!
Want to make the user profiles show information about when he last visited the site. Example: "last seen: Jun 4 16:48". It is necessary, probably, somewhere to insert the query to update the time of the visit.
Prompt, please, as such to implement on the framework Laravel?
2 answers
Create Midler that will update a field in the database with each request. Or to update this field at each login. Depends.
Will advise then you are in the database with each request to update. Funny.
Make a ws server. When he konekt is open then the user is online. And when konekt closes the updated value in the database.
Find more questions by tags Laravel
To Mildura do not need to contact the controller. This is its convenience. The code in meldware runs to the controller. All you need is to join a group of ranting, which will be used for Midler. - rupert_Weissnat79 commented on July 8th 19 at 16:22
- rupert_Weissnat79 commented on July 8th 19 at 16:25