示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * Vote on a voteable.
  *
  * @param  VoteableInterface $voteable
  * @param  int               $weight
  * @return Vote
  */
 public function vote(VoteableInterface $voteable, $weight)
 {
     return Vote::store($this, $voteable, $weight);
 }