Skip to content

Prevent activities from being logged depending on the activity dataΒ #1

Open
@erikgaal

Description

@erikgaal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions