Rangliste vollständig
This commit is contained in:
parent
43fd8c8cbf
commit
c4973664b9
8 changed files with 76 additions and 68 deletions
|
|
@ -37,8 +37,17 @@ class Game extends Model
|
|||
|
||||
public static function resultString($game_id) {
|
||||
$game = Game::where('id',$game_id)->first();
|
||||
$now=Carbon\Carbon::now();
|
||||
|
||||
if (!Game::has_result($game_id)) { return "Anstoss: " . $game->kickoff;}
|
||||
if (!Game::has_result($game_id)) {
|
||||
if ($game->kickoff>$now) return "Anstoss: " . $game->kickoff;
|
||||
|
||||
$start=Carbon\Carbon::parse($game->kickoff);
|
||||
$end=$start->addHours(2);
|
||||
if ($end<$now && $start>$now) return "Läuft";
|
||||
|
||||
return "(Eingeben)";
|
||||
}
|
||||
return $game->score1. " : " . $game->score2;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue