/**
  * Get the leaderboard photos form.
  *
  * @param  \Gladiator\Models\Competition  $competition
  * @param  \Gladiator\Models\Message  $message
  * @return \Illuminate\Http\Response
  */
 public function editLeaderboardPhotos(Competition $competition, Message $message)
 {
     $key = generate_model_flash_session_key($competition, ['includeActivity' => true]);
     if (session()->has($key)) {
         $competition = session($key);
         session()->reflash();
     } else {
         $competition = $this->manager->getCompetitionOverview($competition, true);
     }
     $leaderboard = $competition->activity['active'];
     $topThree = $this->manager->getTopThreeReportbacks($leaderboard, ['includeUserIds' => true]);
     $photos = [];
     foreach ($topThree as $key => $user) {
         $photos[] = LeaderboardPhoto::where('competition_id', '=', $competition->id)->where('message_id', '=', $message->id)->where('user_id', '=', $user['user_id'])->first();
     }
     return view('competitions.leaderboard_photos.edit', compact('competition', 'message', 'photos', 'topThree'));
 }
 /**
  * Download a CSV export of all users.
  *
  * @param  \Gladiator\Models\WaitingRoom  $room
  * @return void
  */
 public function export(WaitingRoom $room)
 {
     $users = $this->manager->getModelUsers($room);
     $csv = $this->manager->exportUsersCsv($users);
     $csv->output('contest_' . $room->contest_id . '-' . 'waitingroom_' . $room->id . '-users.csv');
 }