Skip to content

Fetch activities by specific user #744

Answered by Gummibeer
mira-thakkar asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
thanks for the kind words.
If I'm right your question is the title? If so you can use the \Spatie\Activitylog\Traits\CausesActivity trait in your User model and after this access all activities by the user via the actions relationship.

$user->actions;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mira-thakkar
Comment options

Answer selected by mira-thakkar
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