Show player matches for single userId
This commit is contained in:
parent
93d7670b48
commit
98ebdb6c93
7 changed files with 163 additions and 9 deletions
|
|
@ -198,11 +198,31 @@ class LeaguesController extends Controller
|
|||
$matchesTotal[$match->round_id][$league->id] = $lg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view ('leagues.matches', compact('season', 'matchesTotal','leagues','leagueNames','roundNames'));
|
||||
}
|
||||
|
||||
public static function showLeagueRanking($rank, $maxRoundId=-1) {
|
||||
$season = Season::getCurrent();
|
||||
$leagues = array_reverse(League::getRanking($rank));
|
||||
$leagueNames = League::getNames();
|
||||
$userNames = User::getNames();
|
||||
|
||||
$leagueScores = League::getRanking($rank);
|
||||
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores'));
|
||||
}
|
||||
|
||||
public static function showSingleUserMatches($userId) {
|
||||
$season = Season::getCurrent();
|
||||
$leagueNames = League::getNames();
|
||||
$roundNames = Round::getNames();
|
||||
$matches = Match::getMatchResultsForUser($userId);
|
||||
|
||||
$user = User::where('id','=', $userId)->first();
|
||||
$userName = $user->name;
|
||||
return view ('leagues.playermatches',compact('season','leagueNames','roundNames','matches','userName'));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue