Get diff in after hook #2566
-
Is there some way to get a diff in an after hook? Use CaseI'm building an activity hook that will run after create, patch, update, delete in order to show an audit log of activity in our admin dashboard. Right now it works pretty good I can see a list like Am I wrong or is there some way to persist the original payload for use in an after hook? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I just ended up writing a custom before hook to handle it. Using https://npmjs.com/package/deep-diff:
|
Beta Was this translation helpful? Give feedback.
I just ended up writing a custom before hook to handle it. Using https://npmjs.com/package/deep-diff: