user()?->id === $room->owner_id, 403); return Inertia::render('rooms/Settings', [ 'room' => [ 'id' => $room->id, 'title' => $room->title, 'join_code' => $room->join_code, 'allow_participants_to_manage_rounds' => $room->allow_participants_to_manage_rounds, 'is_persistent' => $room->is_persistent, ], ]); } public function update(UpdateRoomSettingsRequest $request, Room $room): RedirectResponse { $user = $request->user(); abort_unless($user instanceof User, 403); /** @var array{allow_participants_to_manage_rounds: bool, is_persistent: bool} $settings */ $settings = $request->validated(); $this->roomSettings->update($room, $user, $settings); Inertia::flash('toast', [ 'type' => 'success', 'message' => 'Die Raumeinstellungen wurden gespeichert.', ]); return back(); } }