Skip to content

OnlyDirty with required fields to log #748

Answered by Gummibeer
vmiguellima asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
the Activity model has a subject 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/

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vmiguellima
Comment options

Answer selected by Gummibeer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants