show unplayed rounds
This commit is contained in:
parent
98ebdb6c93
commit
7545760aa2
5 changed files with 47 additions and 29 deletions
|
|
@ -174,9 +174,9 @@ class LeaguesController extends Controller
|
|||
public function showLeagueRounds($league_rank, $maxRoundId) {
|
||||
if (Auth::guest()) { return redirect("/"); }
|
||||
|
||||
$maxRoundId = min(Round::getLastCompleteRoundId(),$maxRoundId);
|
||||
|
||||
$season=Season::getCurrent();
|
||||
$maxRoundId = min(Round::getLastRoundId($season->id),$maxRoundId);
|
||||
|
||||
$roundNames = Round::getNames();
|
||||
$leagueNames = League::getNames();
|
||||
$leagues = League::where('season_id','=',$season->id)->where('rank','=', $league_rank)->orderBy('id')->get();
|
||||
|
|
@ -198,7 +198,6 @@ class LeaguesController extends Controller
|
|||
$matchesTotal[$match->round_id][$league->id] = $lg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view ('leagues.matches', compact('season', 'matchesTotal','leagues','leagueNames','roundNames'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue