OnlyDirty with required fields to log #748
-
Hi, after a lot research I couldn't find a way to so it, so I'm here if I can get some help. Problem Structure: I have an Article model where I only want to log field that were changed, so I use But using the My suggestion is like:
I love your packages, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, |
Beta Was this translation helpful? Give feedback.
Hey,
the
Activity
model has asubject
relationship which always points to the subject model of this activity.For model event activity logs this relationship is always the model that triggers the activity.
For custom activities you can set this relationship your own.
https://docs.spatie.be/laravel-activitylog/v3/advanced-usage/logging-model-events/