PHPackages                             alexlisenkov/laravel-web-push - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. alexlisenkov/laravel-web-push

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

alexlisenkov/laravel-web-push
=============================

Send push notifications from your backend via the Web Push Protocol

1.1.0(5y ago)175.2k↑157.1%MITPHPPHP ^7.3 | ^8.0CI failing

Since Nov 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AlexLisenkov/laravel-web-push)[ Packagist](https://packagist.org/packages/alexlisenkov/laravel-web-push)[ RSS](/packages/alexlisenkov-laravel-web-push/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

Send Push Notification in Laravel
=================================

[](#send-push-notification-in-laravel)

[![Total Downloads](https://camo.githubusercontent.com/013eaabe9af96a7647246fc3f73d76db609741725c5a63e9de12d86cfb00f69b/68747470733a2f2f706f7365722e707567782e6f72672f616c65786c6973656e6b6f762f6c61726176656c2d7765622d707573682f646f776e6c6f616473)](https://packagist.org/packages/alexlisenkov/laravel-web-push)[![Coverage Status](https://camo.githubusercontent.com/0c067b341eeacfc47883a4fc17e75446b7926e4c08f350897501999ed3efa63a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f416c65784c6973656e6b6f762f6c61726176656c2d7765622d707573682f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/AlexLisenkov/laravel-web-push?branch=master)[![CI](https://github.com/AlexLisenkov/laravel-web-push/workflows/CI/badge.svg)](https://github.com/AlexLisenkov/laravel-web-push/workflows/CI/badge.svg)

[![More info](https://camo.githubusercontent.com/2844f9fd479e0b6bf6b8061cfe9bb8d89f4eeb3e0c16da45fbbaebe26c2f3764/68747470733a2f2f646576656c6f706572732e676f6f676c652e636f6d2f7765622f66756e64616d656e74616c732f707573682d6e6f74696669636174696f6e732f696d616765732f737667732f7365727665722d746f2d707573682d736572766963652e737667)](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol)

The `alexlisenkov/laravel-web-push` package is a package to send push notifications. Send out push messages as a standalone package. Use this if you dont work with laravel notification channels.

If you are new to the Web Push Protocol please [read about the fundamentals](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol).

Installation
------------

[](#installation)

```
composer require alexlisenkov/laravel-web-push
```

```
php artisan vendor:publish --provider="AlexLisenkov\LaravelWebPush\LaravelWebPushServiceProvider"
```

Configuration
-------------

[](#configuration)

To send out Web Push notifications you need to generate yourself an identity. The simplest thing to do is to visit [https://web-push-codelab.glitch.me](https://web-push-codelab.glitch.me/)

Open up `config/laravel-web-push.php`

Copy the public key and private key into your configuration. Please note that this public key is the same as you will use in the applicationServerKey in the [JavaScript pushManager api](https://developer.mozilla.org/en-US/docs/Web/API/PushManager).

```
