コード例 #1
0
 /**
  * Displays a listing of a user's list of all played rounds.
  *
  * @param int $id Id of player to be displayed.
  */
 public static function show($id)
 {
     $player = Player::find($id);
     $moderatorOf = Course::find_by_moderator($id);
     $course = Course::find($player->course);
     $scores = Score::find_by_player($player->id);
     foreach ($scores as $score) {
         $score->round = Round::find($score->roundId);
     }
     // $rounds = Round::find_by_player($player->id);
     // Kint::dump($rounds);
     View::make('player/show.html', array('player' => $player, 'scores' => $scores, 'moderatorOf' => $moderatorOf, 'course' => $course));
 }