Notifications
These methods are accessible through profile.notifications()
which exposes a NotificationRepository
instance.
Get a list of all notifications
profile.notifications().all();
Get the first stored notification
profile.notifications().first();
Get the last stored notification
profile.notifications().last();
Get a list of all notification keys
profile.notifications().keys();
Get a list of all notification values
profile.notifications().values();
Get a notification by value
profile.notifications().get(notification.id);
Create a new notification for the given data
profile.notifications().push({
icon: "warning",
name: "Ledger Update Available",
body: "...",
action: "Read Changelog",
});
Fill the notifications object with the provided data
profile.notifications().fill(notificationData);
Check if a data for the given notification exists
profile.notifications().has(notificationId);
Forget the notification for the given Id
profile.notifications().forget("uuid");
Forget all notifications (Use with caution!)
profile.notifications().flush();
Get the count of all stored notifications
profile.notifications().count();
Get all read notifications
profile.notifications().read();
Get all unread notifications
profile.notifications().unread();
Mark the for the given Id as read
profile.notifications().markAsRead("uuid");
Last updated 1 month ago
Edit Page