© 2026 Hedgehog Software, LLC
Unable to call component method. Public method [mountAction] not found on component
class DeleteRecordAction { public static function make() { return Action::make('delete_record') ->label('Delete') ->hidden(static function (User $record): bool { if (! method_exists($record, 'trashed')) { return false; } return $record->trashed(); }) ->defaultColor('danger') ->tableIcon(Heroicon::Trash) ->groupedIcon(Heroicon::Trash) ->modalIcon(Heroicon::OutlinedTrash) ->modalHeading(fn (): string => __('filament-actions::delete.single.modal.heading', ['label' => 'Record'])) ->requiresConfirmation() ->action(function (User $record){ $result = (bool) $record->delete(); if (! $result) { Notification::make() ->title('Something went wrong') ->body('Unable to delete record.') ->color('danger') ->send(); } Notification::make() ->title('Deleted successfully') ->body('Record successfully deleted.') ->color('success') ->duration(6500) // 6.5 sec ->actions([ Action::make('Undo') ->button() ->action(fn(User $model) => $model->restore()) // => This cause an error ]) ->send(); }); }