diff --git a/packages/actions/src/ForceDeleteAction.php b/packages/actions/src/ForceDeleteAction.php index da7e2c0646..27ef7bba3c 100644 --- a/packages/actions/src/ForceDeleteAction.php +++ b/packages/actions/src/ForceDeleteAction.php @@ -27,6 +27,8 @@ class ForceDeleteAction extends Action $this->modalSubmitActionLabel(__('filament-actions::force-delete.single.modal.actions.delete.label')); + $this->successNotificationTitle(__('filament-actions::force-delete.single.notifications.deleted.title')); + $this->defaultColor('danger'); $this->tableIcon(FilamentIcon::resolve(ActionsIconAlias::FORCE_DELETE_ACTION) ?? Heroicon::Trash); diff --git a/packages/notifications/src/Notification.php b/packages/notifications/src/Notification.php index 2d77ca7909..19c1637aa5 100644 --- a/packages/notifications/src/Notification.php +++ b/packages/notifications/src/Notification.php @@ -262,6 +262,11 @@ class Notification extends ViewComponent implements Arrayable, HasEmbeddedView } if (blank($notification)) { + Assert::assertNotEmpty( + $notifications->toArray(), + 'A notification was expected but none were sent.', + ); + return; } @@ -298,6 +303,11 @@ class Notification extends ViewComponent implements Arrayable, HasEmbeddedView } if (blank($notification)) { + Assert::assertEmpty( + $notifications->toArray(), + 'No notification was expected but at least one was sent.', + ); + return; }