Exemplo n.º 1
0
 public function view(Game $game)
 {
     $team = Team::find(config('mls.team_id'));
     $statList = StatRepository::getStatsByGameId($game->id);
     $playerList = PlayerRepository::getListByTeamId($game->team_id);
     $statGroupList = Stat::getParameterKeys();
     return view('frontend.game.view')->with('game', $game)->with('statList', $statList)->with('playerList', $playerList->lists('name', 'id'))->with('team', $team)->with('statGroupList', $statGroupList);
 }
 public function edit(Training $training)
 {
     $team = Team::find(config('mls.team_id'));
     $playerList = PlayerRepository::getListByTeamId($team->id);
     $dayList = Training::getDayOfWeekList();
     $visitList = TrainingVisitRepository::getTrainingVisits($training->id);
     $visitList = $visitList->lists('visit', 'player_id');
     return view('frontend.trainings.edit')->with('training', $training)->with('team', $team)->with('playerList', $playerList)->with('dayList', $dayList)->with('visitList', $visitList)->with('statusVisited', Stat::GAME_VISITED)->with('statusNotVisited', Stat::GAME_NOT_VISITED);
 }
Exemplo n.º 3
0
 public function index(Request $request)
 {
     $team = Team::find(config('mls.team_id'));
     $playerList = PlayerRepository::getListByTeamId($team->id);
     $tournamentList = TournamentRepository::getListByTeamId($team->id);
     $selectedPlayerList = $request->get('playerList');
     $selectedTournamentList = $request->get('tournamentList');
     $filterPlayerList = $selectedPlayerList ? $selectedPlayerList : $playerList->lists('id')->all();
     $statList = StatRepository::getFilteredPlayersStatistics($filterPlayerList, $selectedTournamentList);
     return view('frontend.stats.view')->with('team', $team)->with('playerList', $playerList)->with('statList', $statList)->with('tournamentList', $tournamentList->lists('name', 'id'))->with('selectedPlayerList', $selectedPlayerList)->with('selectedTournamentList', $selectedTournamentList);
 }