public function show($playerID)
 {
     $player = Master::where('playerID', '=', $playerID)->first();
     $battingGrids = BattingController::player($playerID);
     $pitchingGrids = PitchingController::player($playerID);
     $fieldingGrids = FieldingController::player($playerID);
     return view('players.show')->with(['player' => $player, 'battingGrids' => $battingGrids, 'pitchingGrids' => $pitchingGrids, 'fieldingGrids' => $fieldingGrids]);
 }
 public static function player($playerID)
 {
     $fielders = Fielding::leftJoin('master', 'fielding.playerID', '=', 'master.playerID')->leftJoin('teams', function ($join) {
         $join->on('fielding.teamID', '=', 'teams.teamID');
         $join->on('fielding.yearID', '=', 'teams.yearID');
     })->select('master.nameLast', 'master.nameFirst', 'teams.name', 'teams.yearID', 'teams.teamID', 'fielding.POS', 'fielding.G', 'fielding.GS', 'fielding.PO', 'fielding.A', 'fielding.E', 'fielding.DP')->where('fielding.playerID', '=', $playerID);
     $grids = FieldingController::grids($fielders, 'player');
     return $grids;
 }
 public function show($teamID, $year)
 {
     $team = Team::leftJoin('league', 'lgID', '=', 'league.id')->leftJoin('division', 'divID', '=', 'division.id')->where('teamID', '=', $teamID)->where('yearID', '=', $year)->first();
     \Debugbar::info($team);
     $battingGrids = BattingController::team($teamID, $year);
     $pitchingGrids = PitchingController::team($teamID, $year);
     $fieldingGrids = FieldingController::team($teamID, $year);
     return view('teams.show')->with(['team' => $team, 'year' => $year, 'battingGrids' => $battingGrids, 'pitchingGrids' => $pitchingGrids, 'fieldingGrids' => $fieldingGrids]);
 }