Answer the question
In order to leave comments, you need to log in
How to get all authorized users?
Hi all.
Can you please tell me how in Laravel 4.2 you can get a list (just id and name) of all users that meet two criteria - they are currently authorized and scored more than 100 points (where 'points' > 100)?
Answer the question
In order to leave comments, you need to log in
You need to create a last_activity_at field and update it every N minutes i.e. so you can get active users at the current time. Then the query:
Where TIME is the timestamp with -N minutes from the current time.
N - this is actually the number of minutes after which you think that the user is now online.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question