Answer the question
In order to leave comments, you need to log in
Yii 2, updating user's last action time?
In pursuit of the topic .
I decided to do it in a clumsy way without any sockets. So.
Which method of updating the time of the last action / transition should be chosen as the most optimal?
1) rely solely on data from Ajax;
2) update using actions in controllers, or in the User model by adding finIdentity to the method, or making a global before action;
3) a mix of the methods above;
4) I don't know how anymore, tell me ;D
P.S.
This is generally normal, no?
Answer the question
In order to leave comments, you need to log in
before action - in my opinion the best option. Simple and works, resources are not particularly annoying. Revealing the "ends of the connection" will lead you to the fact that then you have to somehow connect them with the user id. Why reinvent the wheel?
Решил делать топорным способом без всяких сокетов
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question