-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Save Causer when using LogsActivity trait #503
Comments
The causer is saved if the current guard knows about an user instance. If you want to customize the causer check the |
Sorry but do I tell the causer to use my guard('admin') ? I know that tapActivity() is used if I'm going to use activity() helper function. |
$this->authDriver = $config['activitylog']['default_auth_driver'] ?? $auth->getDefaultDriver(); With this config key you can set your default auth driver. Atm there is no way to change the used auth driver on runtime. But the The |
@jariesdev I would try something like the following to implement it into your system On the model that you are logging activity add something like this
This if you auth is setup correctly should provide the causedBy to the activity logger. I have created a pull request for this issue as well |
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 |
Im using the trait LogsActivity on my model and its saves the event happened but the causer is not saved. I have 2 users Model which is the Admin and Users Model. Did I miss something?
The text was updated successfully, but these errors were encountered: