I hope you can help me. :)
i have a laravel app that is being used by multiple users at once, they all have the possibility to edit some projects in our system.
What i dont want is to have 2 people at the same time editing the same form.
If that happens i would like to tell other users that the current form is locked and is being edited by username.
if user then leaves or submits the form, then the form is opened for other users to work with.
I have checked out both optimistic and pessimistic locking, i dont think this is correct for me
What i was thinking of doing, was to create a unique identifier in the table, that is being edited, and if the user on the page has the identifier, i whould lock all other out, but how would i know if the user closes the browser window? then all other usere still cant access the page/form?
How would you guys suggest i go about this?
Kind Regards Dannie