Working on Case2: New League Creation after Qualification

This commit is contained in:
Torsten 2017-11-02 16:41:07 +01:00
parent d8a7f78cbd
commit 66671b1e81
11 changed files with 12726 additions and 40 deletions

View file

@ -136,7 +136,10 @@ class User extends Authenticatable
}
public static function hasMissingTipp($user_id) {
$round_id = Round::getFirstTippableRound()->id;
$round = Round::getFirstTippableRound();
if (!$round) return false;
$round_id = $round->id;
$games = Game::where('round_id','=',$round_id)->get();
foreach ($games as $game) {
@ -155,7 +158,10 @@ class User extends Authenticatable
}
public static function hasMissingJoker($user_id) {
$round_id = Round::getFirstTippableRound()->id;
$round=Round::getFirstTippableRound();
if (!$round) return false;
$round_id = $round->id;
$games = Game::where('round_id','=',$round_id." user_id=".$user_id)->get();
$joker=0;
foreach ($games as $game) {