/** * Vote on resource by voter. * * @param VoterInterface $voter * @param int $weight * @return Vote|null */ public function voteBy(VoterInterface $voter, $weight) { return Vote::store($voter, $this, $weight); }
/** * Vote on a voteable. * * @param VoteableInterface $voteable * @param int $weight * @return Vote */ public function vote(VoteableInterface $voteable, $weight) { return Vote::store($this, $voteable, $weight); }