Answer the question
In order to leave comments, you need to log in
How to notify about status changes in Yii2?
Hello everyone, there is a table that stores the state of the status. Well for example on adding of record.
1) 1-Entry added;
2) 2 - Record edited
3) 3 - Record confirmed
and let's say there are 2 user levels
1) root - administrator rights to add, edit and confirm a record
2) user - user - add a record.
We need to organize. if root confirms the entry, a modal window pops up for the user about changes to his added entry.
Just add an ajax script to js that checks the user's posts at intervals? Or are there more cultural solutions?
Answer the question
In order to leave comments, you need to log in
Dmitry Bogdanov is right, except for point 4. If the project is small and there are not many users, then to fence something from the first 3 points, this is just "from a cannon to sparrows." Ajax is the simplest option and often the surest one. Yes, it is primitive compared to others, but when you need a hammer, you need to take a hammer, and not look for its most technologically advanced fellow.
To determine which one is correct, you can only see t.z.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question