Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/anonymous causer #605

Merged
merged 11 commits into from
Oct 6, 2019
Merged

Feature/anonymous causer #605

merged 11 commits into from
Oct 6, 2019

Conversation

Jhnbrn90
Copy link

@Jhnbrn90 Jhnbrn90 commented Oct 2, 2019

fixes #567

Adressing the comments by @Gummibeer on previous PR #604 regarding issue #567

This PR adds a causedByAnonymous() method, which can be chained from the activity() helper, resolving the causer_id and causer_type to null.

John Braun added 3 commits October 3, 2019 01:24
By calling `activity()->causedByAnonymous()->...` the activity will not be associated with a certain causer model
src/ActivityLogger.php Show resolved Hide resolved
tests/ActivityLoggerTest.php Outdated Show resolved Hide resolved
tests/ActivityLoggerTest.php Show resolved Hide resolved
tests/ActivityLoggerTest.php Outdated Show resolved Hide resolved
@Gummibeer Gummibeer added enhancement hacktoberfest https://hacktoberfest.digitalocean.com labels Oct 4, 2019
tests/ActivityLoggerTest.php Outdated Show resolved Hide resolved
@Gummibeer
Copy link
Collaborator

And the last thing: can you add it to the documentation? I would prefer it as a simple hint/sentence, like the default causer in https://docs.spatie.be/laravel-activitylog/v3/basic-usage/logging-activity/#setting-a-causer

@Jhnbrn90
Copy link
Author

Jhnbrn90 commented Oct 4, 2019

And the last thing: can you add it to the documentation? I would prefer it as a simple hint/sentence, like the default causer in https://docs.spatie.be/laravel-activitylog/v3/basic-usage/logging-activity/#setting-a-causer

PR #607

@Gummibeer Gummibeer merged commit 83a66b7 into spatie:master Oct 6, 2019
@Gummibeer
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hacktoberfest https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to log system activity without a causer or a null causer
2 participants