league fix for League3 consisting of a single group
This commit is contained in:
parent
0eea680e51
commit
0eda6f46c2
4 changed files with 24 additions and 19 deletions
|
|
@ -114,7 +114,7 @@ class Match extends Model
|
|||
|
||||
|
||||
public static function getLeagueMatches($leagueId) {
|
||||
//error_log("App\Match::getLeagueMatches(leagueId=".$leagueId.")");
|
||||
error_log("App\Match::getLeagueMatches(leagueId=".$leagueId.")");
|
||||
$matches = DB::table('leagues_matches')->where('league_id','=',$leagueId)->orderBy('round_id')->get();
|
||||
$league=League::where('id','=',$leagueId)->first();
|
||||
$season = Season::where('id','=',$league->season_id)->first();
|
||||
|
|
@ -123,6 +123,9 @@ class Match extends Model
|
|||
|
||||
foreach($matches as $match) {
|
||||
//error_log("Needed round_id: ".$match->round_id);
|
||||
//error_log(" User1: ".$match->user1_id);
|
||||
//error_log(" User2: ".$match->user2_id);
|
||||
|
||||
$match->round_name = $roundnames[$match->round_id];
|
||||
$match->user1_name = $usernames[$match->user1_id];
|
||||
$match->user2_name = $usernames[$match->user2_id];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue