route('room'); $player = $this->attributes->get('currentPlayer'); return $room instanceof Room && $player instanceof Player && $player->room_id === $room->id && $player->is_moderator; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'allow_participant_controls' => ['required', 'boolean:strict'], ]; } }