App\Traits\CanFilterByUser::scopeByCurrentUser PHP Method

scopeByCurrentUser() public method

public scopeByCurrentUser ( $query )
    public function scopeByCurrentUser($query)
    {
        return $query->whereUserId(auth()->user()->id);
    }
CanFilterByUser