amjadiqbal/laravel-webpush-kit
A Laravel package for sending Web Push notifications to browsers, with helpers for managing push subscriptions and VAPID keys. Adds push support to your app without building the underlying flow yourself.
pushsubscriptionchange re-subscription, 404/410 dead-endpoint cleanup, service worker scope and caching, declarative web push payloads, and iOS's Add-to-Home-Screen requirement. These are the parts teams get subtly wrong and then discover months later as silent delivery failures.<x-webpush-kit::head /> exist specifically for iPhone/iPad Home Screen apps, because Safari only delivers push to installed web apps. That is a real product constraint: on iOS you are not buying a push channel, you are buying a "convince users to install your web app" funnel. Decide whether that funnel is in scope before committing.php artisan push:test sends a real push and reports what each push service actually answered, flags dead subscriptions the channel removed on 404/410, and warns on a VAPID_SUBJECT that Safari rejects. That is a diagnostic tool that shortens onboarding and cuts a class of "push doesn't work" support tickets — worth valuing separately from the UI component.webpush-kit:subscribed / webpush-kit:unsubscribed browser events. Wire these into analytics before launch or you will have no way to evaluate the rollout.Consider it when all of the following hold:
laravel-notification-channels/webpush 11–13. Older Laravel is out — look elsewhere or budget for a fork.laravel-notification-channels/webpush for server-side sending. This is explicitly the browser half of that stack, not a standalone push provider; it is not an alternative to OneSignal/Firebase.Look elsewhere, or wait, when:
For executives, one paragraph: Web push lets us reach users who have left the site, without an email address and without paying a messaging vendor. Historically the expensive part was not sending the notification — it was the browser-side work: asking for permission without getting permanently blocked, handling the users who already said no, keeping subscriptions alive, and dealing with the iOS quirk that push only works once someone installs our site to their home screen. This package, from the maintainers of the Laravel web push channel, packages all of that as a drop-in button, a service worker and a diagnostic command. It is a small, focused dependency that converts a multi-sprint front-end project into a short integration, and it makes our opt-in rate something we can actively optimise rather than accept. The caveat is maturity: it is a 0.1.0 release, tested thoroughly on Chrome and in CI but not yet on Firefox or desktop Safari, and its notification click-through has not been verified end-to-end. I would recommend a time-boxed pilot on one property to measure opt-in and delivery rates, not a company-wide rollout.
For engineering, the summary: Adopt it as the browser-side layer on top of laravel-notification-channels/webpush, which we would need anyway. It gives us a Blade/Livewire <x-webpush-kit::button /> with permission priming and explicit handling of subscribed, blocked, unsupported, insecure and iOS-A2HS states; a publishable service worker at /webpush-sw.js that renders both WebPushMessage and DeclarativeWebPushMessage, honours data.url / navigate on click, and re-subscribes on pushsubscriptionchange; routes that call the channel's own updatePushSubscription() / deletePushSubscription(); an optional manifest and <x-webpush-kit::head /> for iOS; and php artisan push:test for verifying credentials and surfacing dead endpoints. Constraints: PHP 8.3+, Laravel 12/13, channel 11–13. Quality signals are reasonable for a 0.1.0 — Pest, Pint, PHPStan level 6, CI across three PHP versions and two Laravel majors, plus a real Chrome install against Google's push service including a genuine 410 and Livewire wire:navigate re-renders. Known gaps we would own: Firefox, desktop Safari, iOS Home Screen apps, and an unverified notification click. Plan to verify those four in the pilot, wire the webpush-kit:* events into analytics, and pin the version explicitly.
Ask: approve a scoped pilot with a defined opt-in-rate target, conditional on us completing the Firefox, Safari and click-through verification before any broader rollout.
How can I help you explore Laravel packages today?