Skip to content

User ID and User Type not being added in audits table #864

Answered by parallels999
nabeel-qavi asked this question in Q&A
Discussion options

You must be logged in to vote

User must be logged, if not, you must create your own CustomUserResolver

$user = $this->resolveUser();

$morphPrefix . '_id' => $user ? $user->getAuthIdentifier() : null,
$morphPrefix . '_type' => $user ? $user->getMorphClass() : null,

https://github.com/owen-it/laravel-auditing/blob/master/src/Resolvers/UserResolver.php

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by parallels999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #852 on October 04, 2023 15:57.