Sperrung 1 Minute vor Anstoss anstatt 1 Stunde

This commit is contained in:
TorstenS 2020-09-11 12:17:05 +02:00
parent 0eda6f46c2
commit 90debedbdb
3 changed files with 4 additions and 3 deletions

View file

@ -67,7 +67,8 @@ class Game extends Model
public function getLocktime() {
return Carbon\Carbon::parse($this->kickoff)->addHour(-1);
//return Carbon\Carbon::parse($this->kickoff)->addHour(-1);
return Carbon\Carbon::parse($this->kickoff)->addMinute(-1); // 2020-09-11 changed Lock from Hour to Minute
}
}

View file

@ -30,7 +30,6 @@ class TippsController extends Controller
foreach($rounds as $round) {
$games=Game::all()->where('round_id','=',$round->id);
foreach($games as $game) {
// Tipp erzeugen wenn noch nicht vorhanden
$tipp = DB::table('tipps')->where([
['game_id','=',$game->id],

View file

@ -198,7 +198,8 @@ class Round extends Model
$kickoff = Carbon\Carbon::parse($game->kickoff);
if ($kickoff < $earliestKickoff) { $earliestKickoff = $kickoff; }
}
$earliestKickoff->subHour();
//$earliestKickoff->subHour();
$earliestKickoff->subMinute(); // 2020-09-11 changed from SubHour()
return $earliestKickoff;
}