> */ private array $documents = [ RdpNrwDocument::class, CitySolingenDocument::class, CityRemscheidDocument::class, CityFrankfurtMainDocument::class, BdkjHesse::class, WuppertalDocument::class, ]; /** * @return Collection}> */ public function compilerSelect(): Collection { return collect($this->documents)->map(fn ($document) => [ 'title' => $document::buttonName(), 'class' => $document, ]); } /** * @return array */ public function typeRule(): array { return [ 'type' => ['required', Rule::in($this->documents)], ]; } /** * @param class-string $type * * @return array */ public function rules(string $type): array { return [ ...$type::globalRules(), ...$type::rules(), ]; } }