Can't get the logAttribute of related model in placeholder of getDescriptionForEvent() #808
Unanswered
JoaoAntonio2
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The issue here is the laravel-activitylog/src/ActivityLogger.php Line 221 in 08a128e To solve this the array should be saved using But this would be a BC. 🤔 As a temporary fix we could try something like this to prefer an exact key-match in favor of the dot.notation magic. return $attributeValue[$propertyName] ?? Arr::get($attributeValue, $propertyName, $match); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Order model that belongsTo a Client model, when logging the Order model i want to retrieve a attribute "name" of the Client model so i made:
and in the
getDescriptionForEvent
method i have:But it simply doesnt bind the client name in the description correctly, the other placeholders works fine, but when i try to return the client.name it doesnt work.
Here is a Model instance of the Activity returned on tinker:
Beta Was this translation helpful? Give feedback.
All reactions