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

Logging Model Events with a Causer when User not logged in (Jobs and Seeders) #661

Closed
fredbradley opened this issue Feb 5, 2020 · 2 comments · Fixed by #866 or #787
Closed

Logging Model Events with a Causer when User not logged in (Jobs and Seeders) #661

fredbradley opened this issue Feb 5, 2020 · 2 comments · Fixed by #866 or #787

Comments

@fredbradley
Copy link

Is there a way of populating the causer_id and causer_type fields for Model Event logging when the user isn't logged in.

For example in Seeders, and (most importantly) in Queued Jobs.

@Gummibeer
Copy link
Collaborator

This relates to #649 & #582

Right now there are multiple ways doing so.

  • do Auth::login() in your Commands
  • use the tapActivity() method on the models
  • use an observer on the activity model

But the best would be to implement something like requested in #582

@Gummibeer Gummibeer self-assigned this Feb 5, 2020
@Gummibeer Gummibeer mentioned this issue Sep 16, 2020
Merged
9 tasks
@nagi1 nagi1 mentioned this issue Apr 9, 2021
10 tasks
This was linked to pull requests Apr 19, 2021
Merged
nagi1 referenced this issue in nagi1/laravel-activitylog Apr 24, 2021
@Gummibeer
Copy link
Collaborator

I will close this issue even if v4 isn't released yet. But the task itself is done and I want to check which tasks are really open. Please keep an eye on #787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants