Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Webpush Laravel Package

laravel-notification-channels/webpush

Laravel notification channel for sending Web Push notifications. Supports VAPID keys, major browsers, rich payload options (title, actions, data, TTL), and easy subscription management on models with automatic cleanup of expired endpoints.

View on GitHub
Deep Wiki
Context7
11.0.0

This is a major release containing several breaking changes:

  • Breaking: default encoding is now aesgcm128, when the encoding on the stored push subscription is null
  • Breaking: at the PushSubscription-model the property content_encoding is now casted to the Minishlink\WebPush\ContentEncoding-enum, therefore minishlink/web-push is bumped to at least v10.0.1
  • Breaking: drop support for Laravel 11
  • Breaking: the MessageValidationFailed class is now marked as final
  • Breaking: the WebPushMessageInterface interface now requires getOptions() to be defined on classes implementing this interface
  • Tests now run in PHPUnit v13

Full Changelog: https://github.com/laravel-notification-channels/webpush/compare/10.5.0...11.0.0

10.4.0

What's Changed

Full Changelog: https://github.com/laravel-notification-channels/webpush/compare/10.3.0...10.4.0

10.2.0
  • Remove Google Cloud Messaging (GCM) configuration. This service does not exist anymore and web-push-php doesn't have support for it's successor (Firebase Cloud Messaging) either, so this isn't a breaking change.
10.1.0
  • Allow to set WebPush automatic padding in config (#176)
10.0.0
  • Adds support for Laravel 12, drops support for Laravel 9 and 10, drops support for PHP 8.1 (#208)
  • Adds native types (#209) - if you override functions or implement interfaces of this package, please note that you might need to change method signatures
8.0.0
  • Added support for Laravel 11.
7.1.0
  • Added support for Laravel 10.
7.0.0
  • Upgrade web-push dependency #172.
6.0.0
  • Added support for Laravel 9.
  • Dropped support for Laravel < 8 and PHP < 8.
5.1.1
  • Fixed action without icon #130.
5.1.0
  • Added PHP 8.0 support #150.
  • Added NotificationSent and NotificationFailed events.
  • Removed Log::warning from ReportHandler.
  • Switched to GitHub actions.
5.0.3
  • Laravel 8.x Support
5.0.2
  • Laravel 7.0 compatibility
5.0.1
  • Added the icon parameter to the action method.
5.0.0
  • Laravel 6.0 compatibility
  • PHP 7.2 or greater is required
  • Pass $message to ReportHandler
4.0.0
  • Upgraded to minishlink/web-push to v5
  • Added WebPushMessage::options()
  • Added ReportHandler to handle notification sent reports.
  • Added options for customizing the model, table and connection.
  • Added polymorphic relation. HasPushSubscriptions can now be used on any model.
3.0.1
  • Laravel 5.1+ compatibility
  • Increase endpoint column length
3.0.0
  • Removed id and create methods from WebPushMessage.
  • Added badge, dir, image, lang, renotify, requireInteraction, tag, vibrate, data methods on WebPushMessage.
2.0.0
  • Added support for package discovery.
  • Removed compatibility with PHP<7 and upgrade deps.
1.0.0

Features

  • Added support for VAPID.
  • Added dedicated config file.

Upgrading

Install the latest version via composer:

composer require laravel-notification-channels/webpush

Generate the VAPID keys with (required for browser authentication) with:

php artisan webpush:vapid

If you still want support Google Cloud Messaging set the GCM_KEY and GCM_SENDER_ID in your .env file. Previously these keys where stored in config/services.php.

For a complete implementation with a Service Worker check this demo.

0.2.0
0.1.1
0.1.0
0.0.1
  • experimental release
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky