TabletopDOCS
API Reference

Notifications

Database notifications surfaced in the admin bell. Backed by Laravel's database channel — the payload is page-independent, so actions are links only, never server closures.

Database notifications surfaced in the admin bell. Backed by Laravel's database channel — the payload is page-independent, so actions are links only, never server closures.

Notification

Tbtop\Admin\Notifications\Notification

MethodWhat it does
actions(array $actions): selfLinks only — never a server closure. The payload is frozen into notifications.data and rendered independent of any page or request, so there's no endpoint left to resolve a closure against.
body(string $body): selfOptional supporting text shown under the title.
color(string $color): selfSemantic color token: success/warning/danger/info or a registered custom.
danger(): selfSugar for status('danger').
icon(string $icon): selfLucide icon name (client icon registry); overrides the status default.
info(): selfSugar for status('info').
sendToDatabase(mixed $notifiables): voidSend to one or more notifiables now via the database channel.
status(string $status): selfSemantic status, set via color() under the hood. success()/warning()/danger()/info() are sugar calling this with a fixed value.
success(): selfSugar for status('success').
title(string $title): selfThe only field always present on the wire payload; every other setter is optional.
warning(): selfSugar for status('warning').

NotificationAction

Tbtop\Admin\Notifications\NotificationAction

MethodWhat it does
openInNewTab(bool $newTab = true): selfOpen the link in a new browser tab instead of navigating in place.
url(string $url): selfTarget URL the action link navigates to.

On this page