D
D
Denwebart2015-08-07 17:40:48
Laravel
Denwebart, 2015-08-07 17:40:48

Users online on Laravel 4.2?

Tell me, please, how to implement simple and high-quality control of users who are currently on the site, show online or not (registered users)? I would like to add here whether they are from a mobile device, and, perhaps, how many bots are currently on the site.
I searched a lot on the Internet, but did not find anything sensible.
I tried the package https://github.com/JN-Jones/visitor-log , but a lot of errors fell during installation. Do not want.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav Barsukov, 2015-08-08
@slavabars

As well as not on laravel. Use the timestamp of the user's last action.
For example, online is equal to 3 minutes, users who have changed the time during the past 3 minutes are online, the rest are off.
Why write a package for 5 lines of code?

S
Sergey Gladkovskiy, 2015-08-10
@SMGladkovskiy

If you need strictly up-to-date information at the moment, try websockets. But it's overkill, I think. Better as the previous speaker suggested ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question