webpush channel delivers browser push notifications to users who have subscribed via a service worker. It uses the laravel-notification-channels/webpush package and the Web Push Protocol with VAPID authentication.
How Web Push works
WebPushNotification class retrieves them:
VAPID keys setup
Thelaravel-notification-channels/webpush package requires a VAPID key pair for authenticating push messages with browser push services.
Generate VAPID keys
VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY. Add them to your .env file:The webpush channel identifier
Register the channel inconfig/notification-center.php:
webpush in a strategy’s channel list:
The WebPushNotification class
Subscribing users
The Notifications Dashboard shows a prompt card when a user has no active push subscriptions:Mobile service worker compatibility
Version 1.1.6 shipped a fix for service worker compatibility on mobile devices (fix(webpush): fixed service worker compatibility with mobile). Ensure you are on v1.1.6 or later for reliable push delivery on iOS and Android browsers.
Troubleshooting push subscriptions
Troubleshooting push subscriptions
Subscription not saved
- Confirm the app is served over HTTPS (including
localhostvia a reverse proxy orhttps://scheme). - Verify
VAPID_PUBLIC_KEYandVAPID_PRIVATE_KEYare set in.env. - Check the browser console for service worker registration errors.
- Ensure the user granted browser notification permission.
- On mobile, confirm you are on v1.1.6+ for the service worker compatibility fix.
- Check that the
webpushchannel appears in the strategy’schannelsarray. - Confirm the profile has
pushSubscriptionsby checking the Subscriptions tab on the Profile detail view.
- Open a delivery record in Nova and run Actions → Force Delivery to bypass the scheduler and immediately dispatch the notification.