You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all events in a model's logged array are logged. We might want to prevent actually saving the activity based on the data in the activity.
For example, if a model Article is updated and (only) the published_at is changed. We might want to drop that activity in favour of the ArticlePublished or eloquent.published: 'App\Models\Article' event. Currently there only exist implementations to discard an event based on the event name in LogsActivity::shouldLogEvent($event) and to transform the activity data (but not discard) in LogsActivity::transformActivity($activity).
Any ideas on how to improve this behaviour are very much welcomed.
The text was updated successfully, but these errors were encountered:
Somewhere needs to be registered which activity has higher priority. This is a difficult one because eventually you don't know if the next activity had higher priority and needs to be dropped afterwards.
I think there should be some kind of rules array, that if column published_at is edited only use the published event as activity and so on. I can try to work it out and let you see an example of it.
I have created a pull request, i am aware of the typo in the commit message, sorry about that 😅 . Let me know if anything doesn't seem right and I will try my best to change it
Currently, all events in a model's
logged
array are logged. We might want to prevent actually saving the activity based on the data in the activity.For example, if a model
Article
is updated and (only) thepublished_at
is changed. We might want to drop that activity in favour of theArticlePublished
oreloquent.published: 'App\Models\Article'
event. Currently there only exist implementations to discard an event based on the event name inLogsActivity::shouldLogEvent($event)
and to transform the activity data (but not discard) inLogsActivity::transformActivity($activity)
.Any ideas on how to improve this behaviour are very much welcomed.
The text was updated successfully, but these errors were encountered: