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