ActivityLog on Polymorphic Relationships #1224
Unanswered
paulprinke
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ActivityLog has been working great in our application, however, we just introduced some polymorphic relationships... I have made sure that the pivot tables have a in column in an attempt to follow the spatie documentation on pivot relations. I have been unable to get the
updateExistingPivot
to trigger the events required trigger the activity logger functions. I have resorted to update the relational table directly with the associated data. (Eloquent $model->save() on the cross reference table).This is an example of what is working on the tables, but not creating an ActivityLog records.
This is the workaround that is working both at table level AND ActivityLog records.
Beta Was this translation helpful? Give feedback.
All reactions