requiresConfirmation(); $this->modal(); $this->before(function (BaseAction $action, mixed $livewire): void { if ($livewire instanceof BaseRelationManager) { $this->createActionLog($action, $livewire->getOwnerRecord()); $livewire->dispatch('updateAllRelationManager'); } elseif (($record = $this->getRecord()) instanceof Model) { $this->createActionLog($action, $record); } }); $this->after(function (mixed $livewire, BaseAction $action): void { if ($action instanceof ShouldQueue) { return; } $this->finishedLog(); if ($livewire instanceof BaseViewResource || $livewire instanceof BaseRelationManager) { $livewire->dispatch('updateAllRelationManager'); } }); $this->modalWidth(Width::FourExtraLarge); } }