Working in Liga Auf/Abstieg

This commit is contained in:
Torsten 2017-10-11 11:14:23 +02:00
parent 0d690560ab
commit 444ce18f63
4 changed files with 115 additions and 4 deletions

View file

@ -43,4 +43,11 @@ class Season extends Model
$setting->current_season_id=$season_id;
$setting->save();
}
public static function getLast() {
$seasons=Season::where('id','>',0)->orderBy('id','DESC')->get();
if (sizeof($seasons)<2) { return null; }
return $seasons[1];
}
}