Web Push notifications via VAPID keys and the laravel-notification-channels/webpush package.
Vito Business OS delivers push notifications to browsers and mobile home screens using the Web Push protocol via the laravel-notification-channels/webpush package. Push notifications are delivered even when the browser tab is closed, as long as the user has granted permission.
Never rotate VAPID keys in production without first deleting all existing push subscriptions. Existing subscriptions are tied to the old public key and will fail silently after a key change.
The User model uses the HasPushSubscriptions trait from the webpush package:
// app/Models/User.phpuse NotificationChannels\WebPush\HasPushSubscriptions;class User extends Authenticatable{ use HasPushSubscriptions; // ...}
This trait provides updatePushSubscription() and deletePushSubscription() methods used by the API controller, as well as the pushSubscriptions relationship used by the channel to deliver notifications.
Sent to tenant admins when a new order is placed. Channels: database, mail, broadcast, WebPushChannel. Payload includes order number, customer name, and formatted total.
ExportReadyNotification
Sent when a background export job completes. Channels: database, broadcast. The broadcast payload includes a signed download URL valid for 30 minutes.
ReportReadyNotification
Sent when a background report job finishes. Channels: mail, database. Includes a secure download URL with an expiry date.
SubscriptionExpiringNotification
Triggered by a daily console command 72 hours before subscription expiry. Channels: database, mail. Links directly to the billing page.
Web Push is supported in all modern browsers (Chrome, Firefox, Edge, Safari 16.4+). iOS Safari requires the app to be installed to the home screen before push notifications work.
Test your VAPID configuration locally using a tool like web-push-testing-service or by checking the Laravel log (LOG_CHANNEL=stack) for push delivery errors.