*/ public array $params = []; public string $notify = 'Aktion ausgeführt.'; public static function modalMaxWidth(): string { return 'md'; } public function confirm(): void { if ($this->auditAction !== '') { AuditEvent::create([ 'user_id' => Auth::id(), 'server_id' => $this->serverId, 'actor' => Auth::user()?->name ?? 'system', 'action' => $this->auditAction, 'target' => $this->auditTarget, 'ip' => request()->ip(), ]); } if ($this->event !== '') { $this->dispatch($this->event, ...$this->params); } $this->dispatch('notify', message: $this->notify); $this->closeModal(); } public function render() { return view('livewire.modals.confirm-action'); } }