laravel-revisionable
laravel-revisionable copied to clipboard
Add more examples
E.g. it is not clear how to undo deletion
I can see the change (deletion) saved in revisions table, but how do I roll it back?
Hey there..
You can simply "rollback" to any revision you like and then save again in order to create a new "point in the timeline".
Consider the following example:
You are currently at version 9 of an Address object. The user then rolls back to any previous version (e.g., lets say, he rolls back to version 4). You (as a developer) may not immediately save this version back to the database (this is now version 10, with the "content" of version 4).
You know, what i mean? Cheers
This I understand now. However, no rollback is possible once the model has been destroyed (after delete/destroy). I think it would be great if this would be also possible.
On Thu, Jan 4, 2018 at 11:12 AM, Johannes Schobel [email protected] wrote:
Hey there.. You can simply "rollback" to any revision you like and then save again in order to create a new "point in the timeline".
Consider the following example: You are currently at version 9 of an Address object. The user then rolls back to any previous version (e.g., lets say, he rolls back to version 4). You (as a developer) may not immediately save this version back to the database (this is now version 10, with the "content" of version 4).
You know, what i mean? Cheers
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johannesschobel/laravel-revisionable/issues/9#issuecomment-355245393, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJ3zQ2Qy2bjkfOJOg1Xs5gtC9XfPb5Uks5tHKQmgaJpZM4RSL5G .
You need to enable SoftDeletes()
OK, cool, thanks.
On Thu, Jan 4, 2018 at 11:39 AM, Johannes Schobel [email protected] wrote:
You need to enable SoftDeletes()
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johannesschobel/laravel-revisionable/issues/9#issuecomment-355250747, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJ3zdMBXn23RP3tuuKffA6J2vqxNeU2ks5tHKpGgaJpZM4RSL5G .