I want to implement a write lock function in a Yii2 application.
If one user opens a link / update record (example http://localhost/myproject/backend/web/user/update/1 ), another user will not be able to access this link, and the user will receive an ALERT message that says: " This post has already been opened by another user. " Thus, the post / page should be blocked for another user. (Similar to MS Excel lock)
As soon as the first user finishes and leaves this record / page, he must be unlocked, and another user can read / update this data.
So, how can I use the mysql database locking mechanism here in active Yii2 entries or is there any other way to implement this.
Any help would be appreciated.
source share