public function votedItems($class = null)
    {
        if (!empty($class)) {
            $this->setVoteRelation($class);
        }

        return $this->morphedByMany($this->voteRelation, 'votable', $this->vote_table ?: 'votes')->withTimestamps();
    }
public function votedItems($class = null)
    {
        if (!empty($class)) {
            $this->setVoteRelation($class);
        }

        return $this->morphedByMany($this->voteRelation, 'votable', $this->vote_table ?: 'votes')->withTimestamps();
    }
public function votedItems ( $ class = null ) { if ( ! empty ( $ class ) ) { $ this -> setVoteRelation ( $ class ) ; } return $ this -> morphedByMany ( $ this -> voteRelation , 'votable' , $ this -> vote_table ? : 'votes' ) -> withTimestamps ( ) ; }
Return the user what has items.

@param string $class

@return \Illuminate\Database\Eloquent\Relations\BelongsToMany
Return the user what has items .