Skip to content

How to get user for audit? #945

Answered by willpower232
newave-ws asked this question in Q&A
Discussion options

You must be logged in to vote

Oh hang on, because you've requested specific columns, you've missed off user_type.

Some simpler version of your code would be

$query = $modelInstance->query()
    ->where('id', $request->id)
    ->with([
        'audits' => function ($query) { $query->orderBy('id', 'desc'); },
        'audits.user',
    ]);

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@newave-ws
Comment options

@willpower232
Comment options

@newave-ws
Comment options

@willpower232
Comment options

Answer selected by newave-ws
@newave-ws
Comment options

@newave-ws
Comment options

@willpower232
Comment options

@newave-ws
Comment options

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