'required|string|max:255|regex:/^[a-z0-9]([a-z0-9\-\.]+[a-z0-9])?$/i|unique:domains,hostname', ]; } public function save(): void { $this->validate(); $workspace = app('current_workspace'); (new CreateDomain)->handle($workspace, $this->hostname); $this->dispatch('domainAdded'); $this->dispatch('toast', message: 'Domain hinzugefügt', type: 'success'); $this->closeModal(); } public static function modalMaxWidth(): string { return 'md'; } public function render(): View { return view('livewire.modals.add-domain'); } }