Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

broefs's avatar

Moderatable, Revisionable, and SoftDeletes at the same time

I have a model Target of which I need to keep history of any changes made to instances. For this I intent to use https://github.com/VentureCraft/revisionable.

In addition I have two groups of users: 'Target manager' and 'Target moderator'. 'Target manager' may suggest new and changes to existing Targets. 'Target moderator' may subsequently approve these. I was thinking of using https://github.com/hootlex/laravel-moderation for this.

Finally I'm using SoftDeletes trait on the Target model.

When a 'Target manager' suggest a change to a Target I would like the suggested change to be stored as a revision with moderation status 'pending' and I would like the previous version to be retrieved retrieved on all queries to the Target (Target::all();) model by default.

Can anyone tell me if this scenario will work? Or does anyone have a better approach?

0 likes
1 reply

Please or to participate in this conversation.