Example #1
0
 public function getHistory($category = '')
 {
     $raids = null;
     $title = 'Raid';
     $description = '';
     $p = $this->isPanda;
     switch ($category) {
         case "Raid":
             $description = 'Raids';
             $raids = Game::raid($p)->singular()->with('players.historyAccount')->paginate(10);
             break;
         case "Flawless":
             $description = 'Flawless Raids';
             $raids = Game::flawless($p)->singular()->with('players.historyAccount')->paginate(10);
             break;
         case "RaidTuesdays":
             $description = 'Raid Tuesdays';
             $raids = Game::tuesday($p)->with('players.historyAccount')->paginate(10);
             break;
         case "PVP":
             $description = 'PVP';
             $title = 'Gametype';
             $raids = Game::multiplayer($p)->singular()->with('players.historyAccount', 'pvp')->paginate(10);
             break;
         case "PoE":
             $description = 'Prison Of Elders';
             $raids = Game::poe($p)->singular()->with('players.historyAccount')->paginate(10);
             break;
         case "ToO":
             $description = 'Trials Of Osiris';
             $title = 'Gametype';
             $raids = Game::passage()->with('players.historyAccount')->paginate(10);
             break;
         default:
             \App::abort(404);
             break;
     }
     Hashes::cacheHistoryHashes($raids);
     return view('destiny.games.history')->with('raids', $raids)->with('t_header', $title)->with('title', 'PandaLove: ' . $description . ' History')->with('description', 'PandaLove complete history of: ' . $description);
 }