return $rounds->toArray();
}
+ public function settings(Request $request, Tournament $tournament) {
+ $this->authorize('update', $tournament);
+ $validatedData = $request->validate([
+ 'show_numbers' => 'boolean|nullable',
+ ]);
+ if (array_key_exists('show_numbers', $validatedData)) {
+ $tournament->show_numbers = $validatedData['show_numbers'];
+ }
+ $tournament->save();
+ if ($tournament->wasChanged()) {
+ TournamentChanged::dispatch($tournament);
+ Protocol::tournamentSettings($tournament, $request->user());
+ }
+ return $tournament->toJson();
+ }
+
public function open(Request $request, Tournament $tournament) {
$this->authorize('update', $tournament);
$tournament->accept_applications = true;