'applications.user',
'rounds',
'rounds.results',
+ 'rounds.results.user',
'participants',
'participants.user',
)->findOrFail($id);
public function discordSettings(Request $request, Tournament $tournament) {
$this->authorize('update', $tournament);
$validatedData = $request->validate([
+ 'round_category' => 'string|nullable',
'round_template' => 'string|nullable',
]);
+ if (array_key_exists('round_category', $validatedData)) {
+ $tournament->discord_round_category = $validatedData['round_category'];
+ }
if (array_key_exists('round_template', $validatedData)) {
$tournament->discord_round_template = $validatedData['round_template'];
}
$tournament->accept_applications = true;
$tournament->save();
TournamentChanged::dispatch($tournament);
- Protocol::tournamentOpenen($tournament, $request->user());
+ Protocol::tournamentOpened($tournament, $request->user());
return $tournament->toJson();
}