'required|max:200', 'slug' => 'nullable|alpha_dash|max:80|unique:bio_pages,slug', ]; } public function save(): void { $this->validate(); $workspace = app('current_workspace'); if (empty($this->slug)) { $this->slug = Str::slug($this->title).'-'.Str::random(4); } BioPage::create([ 'workspace_id' => $workspace->id, 'slug' => $this->slug, 'title' => ['en' => $this->title, 'de' => $this->title], 'theme' => [], 'is_published' => false, ]); $this->dispatch('bioPageCreated'); $this->dispatch('toast', message: 'Bio Page erstellt', type: 'success'); $this->closeModal(); } public static function modalMaxWidth(): string { return 'md'; } public function render(): View { return view('livewire.modals.create-bio-page'); } }