Working in Liga Auf/Abstieg
This commit is contained in:
parent
0d690560ab
commit
444ce18f63
4 changed files with 115 additions and 4 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue