Spatie Activity Log / Show causer in Filament timeline widget #1319
Unanswered
FrazeColder
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
-
I'm using the Activitylog Pro package (link) and running into an issue with displaying log details in my FilamentPHP OrderResource.
Context
Order
andDisapprove
.OrderResource
, I display a timeline of activities.This is my current widget:
Problem
The
$record
variable in the modal always refers to theOrder
model. I need it to reference the specific Disapprove model associated with the log entry.I store the Disapprove model as the "causer" of the log entry, which might not be the best practice, but it’s what I’m working with. How can I modify the code to achieve this and retrieve the "causer" for each log entry to pass the data to the modal?
As already mentioned, it does not make sense to just retrieve the most recent log entry. This way all buttons/modals would display the most recent disapproval reason and not the one I wanted to open.
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions