src/ActivityLog/Models/Activity.php
public function scopeForSubject(Builder $query, Model $subject)
    {
        return $query
            ->where('subject_type', $subject->getMorphClass())
            ->where('subject_id', $subject->getKey());
    }
public function scopeForSubject(Builder $query, Model $subject)
    {
        return $query
            ->where('subject_type', $subject->getMorphClass())
            ->where('subject_id', $subject->getKey());
    }
Scope a query to only include activities for a given subject.

@param \Igniter\Flame\Database\Builder $query
@param Model $subject

@return \Illuminate\Database\Eloquent\Builder