Rangliste vollständig
This commit is contained in:
parent
43fd8c8cbf
commit
c4973664b9
8 changed files with 76 additions and 68 deletions
|
|
@ -29,6 +29,8 @@ class Round extends Model
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function isCompleted($round_id) {
|
||||
$round = Round::where('id','=',$round_id)->first();
|
||||
$games = Game::where('round_id','=',$round->id)->get();
|
||||
|
|
@ -51,4 +53,16 @@ class Round extends Model
|
|||
return $lastCompleteRound;
|
||||
}
|
||||
|
||||
public static function getLastLockedRoundId() {
|
||||
$season = Season::getCurrent();
|
||||
$rounds=Round::where('season_id','=',$season->id)->orderBy('id')->get();
|
||||
$lastLockedRoundId=-1;
|
||||
foreach ($rounds as $round) {
|
||||
if (Round::hasLockedGame($round->id) == true) {
|
||||
$lastLockedRoundId = $round->id;
|
||||
}
|
||||
}
|
||||
return $lastLockedRoundId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue