X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FHttp%2FControllers%2FRoundController.php;h=04e1b865ca0fb3560be7ac9231e5f998b3974897;hb=537b998e8059c56e3a20ee2a89d42c3bbfbb80b8;hp=4938b3a04a0bac61c31ccd2d2ba49dd604d2209c;hpb=d1f28ea443b090c7593791eba9631796ccaeafe1;p=alttp.git diff --git a/app/Http/Controllers/RoundController.php b/app/Http/Controllers/RoundController.php index 4938b3a..04e1b86 100644 --- a/app/Http/Controllers/RoundController.php +++ b/app/Http/Controllers/RoundController.php @@ -22,7 +22,9 @@ class RoundController extends Controller $tournament->loadMax('rounds', 'number'); $round = Round::create([ + 'game' => $tournament->game, 'number' => intval($tournament->rounds_max_number) + 1, + 'no_record' => $tournament->no_record, 'tournament_id' => $validatedData['tournament_id'], ]); @@ -55,7 +57,7 @@ class RoundController extends Controller RoundChanged::dispatch($round); - $round->load('results'); + $round->load(['results', 'results.user']); return $round->toJson(); } @@ -74,7 +76,7 @@ class RoundController extends Controller RoundChanged::dispatch($round); - $round->load('results'); + $round->load(['results', 'results.user']); return $round->toJson(); } @@ -93,7 +95,7 @@ class RoundController extends Controller RoundChanged::dispatch($round); - $round->load('results'); + $round->load(['results', 'results.user']); return $round->toJson(); }