예제 #1
0
 /**
  * Create a staff member
  *
  * @param array $data
  * @return bool
  * @throws CreateFailedException
  */
 public function create(array $data)
 {
     $account = $this->account->findByName($data['account']);
     if (!$account) {
         throw new CreateFailedException('This account does not exist!');
     }
     $player = $this->player->findByName($data['player']);
     if (!$player) {
         throw new CreateFailedException('This player does not exist!');
     }
     return (bool) $this->staff->create($data);
 }
예제 #2
0
 public function players($perPage = 10)
 {
     return $this->player->highscore($perPage);
 }