[Request] Version control on Eloquent models
This might be something which is considered a step too far for Eloquent and should instead remain as part of the application logic, but I thought I would raise it as a potential feature for the future.
I am currently building an application where the user can edit certain models, for example a Page. They can choose to publish the page, which in my application then sets this to have a status of published (one of the attributes) and the page is then viewable. If the user returns to edit the page, I then create a second record in the database, with an incremented version number and a status of draft. The user can then edit this draft without impacting on the live version at all. When they are happy, this version is published and the status of the previously published version is set to archived.
In the same way as Eloquent manages the timestamps, soft deleting and relationships I wonder if it might be possible to expand its scope to cover version control?
Feel free to make a package for it.
OK cool, thanks for your response. I will give it a go.