> */ public function rules(): array { return [ 'channels' => ['sometimes', 'string', 'max:1024', 'regex:/^[0-9a-fA-F-]{36}(,[0-9a-fA-F-]{36}){0,19}$/'], 'mode' => ['sometimes', 'in:read,edit'], 'format' => ['sometimes', 'in:tree,html'], ]; } /** * @return array{channels?: list, mode?: string, format?: string} */ public function render(): array { $data = $this->validated(); if (isset($data['channels'])) { $data['channels'] = array_values(array_unique(explode(',', $data['channels']))); } return $data; } }