Notifications
Notifications are stored user messages. Toasts are realtime-only messages.
Use notifications for information the user may need later. Use toasts for short feedback after an action.
qore()->notifications()->createNotification(
userId: $user->id,
title: 'Import finished',
body: 'The file is ready.'
);
qore()->notifications()->showToast(
userId: $user->id,
title: 'Saved'
);
Notifications exist for messages a user can revisit. Use toasts for short feedback that does not need history.
Broadcasting must be enabled for realtime delivery.