PHPackages                             clementblanco/pusher-push-notifications - 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. clementblanco/pusher-push-notifications

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

clementblanco/pusher-push-notifications
=======================================

Pusher native Push Notifications driver.

1.1.0(7y ago)01.4k1MITPHPPHP &gt;=5.6.4

Since Aug 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/clementblanco/pusher-push-notifications)[ Packagist](https://packagist.org/packages/clementblanco/pusher-push-notifications)[ Docs](https://github.com/clementblanco/pusher-push-notifications)[ RSS](/packages/clementblanco-pusher-push-notifications/feed)WikiDiscussions master Synced 1mo ago

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

Pusher push notifications channel for Laravel 5.3 - 5.6
=======================================================

[](#pusher-push-notifications-channel-for-laravel-53---56)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4ef519189c5fb7adbcd6761543582728e7b3399fc1197054933021546efb3fb0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7075736865722d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e3d8d5bc5a0d471bd316a65cfe562a463e03534a7efdbd8e4ec01e5b75c8936b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7075736865722d707573682d6e6f74696669636174696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/pusher-push-notifications)[![StyleCI](https://camo.githubusercontent.com/5aa508ba52e7eef928bd37347e405de61819fed2055ea4391529980b2f2f0211/68747470733a2f2f7374796c6563692e696f2f7265706f732f36353337393332312f736869656c64)](https://styleci.io/repos/65379321)[![SensioLabsInsight](https://camo.githubusercontent.com/cc88870747ad11c0f3b0a6d4efcde14e8d74df772b765e80d8a624cd11836395/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f39303135363931662d313330642d346663612d383731302d3732613031306162633638342e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/9015691f-130d-4fca-8710-72a010abc684)[![Quality Score](https://camo.githubusercontent.com/565f2b806d86414aa052ca69cb92f5568aab03e32f69439ca895ae8f304c910d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7075736865722d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications)[![Code Coverage](https://camo.githubusercontent.com/0f855731dce53afe4900795c73ab5aeaea06f5641bdba010d65117256d40b44b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7075736865722d707573682d6e6f74696669636174696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/f9db973574e62aa906809f54cd62690829f025681a29e798081b4d805aae1978/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f7075736865722d707573682d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)

This package makes it easy to send [Pusher push notifications](https://pusher.com/docs/push_notifications) with Laravel 5.3 - 5.6.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up your Pusher account](#setting-up-your-pusher-account)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require clementblanco/pusher-push-notifications:^1.0
```

You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NotificationChannels\PusherPushNotifications\PusherPushNotificationsServiceProvider::class,
],
```

### Setting up your Pusher account

[](#setting-up-your-pusher-account)

Before using this package you should set up a Pusher account. Here are the steps required.

- Login to
- Select your app from the sidebar or create a new app.
- Click on the "Push Notifications" tab.
- Upload your APNS Certificate or add your GCM API key.
- Now select the "App Keys" tab.
- Copy your `app_id`, `key`, and `secret`.
- Update the values in your `config/broadcasting.php` file under the pusher connection.
- You're now good to go.

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the Notification class.

```
use NotificationChannels\PusherPushNotifications\PusherChannel;
use NotificationChannels\PusherPushNotifications\PusherMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [PusherChannel::class];
    }

    public function toPushNotification($notifiable)
    {
        return PusherMessage::create()
            ->iOS()
            ->badge(1)
            ->sound('success')
            ->body("Your {$notifiable->service} account was approved!");
    }
}
```

### Available Message methods

[](#available-message-methods)

- `platform('')`: Accepts a string value of `iOS` or `Android`.
- `iOS()`: Sets the platform value to iOS.
- `android()`: Sets the platform value to Android.
- `title('')`: Accepts a string value for the title.
- `body('')`: Accepts a string value for the body.
- `sound('')`: Accepts a string value for the notification sound file. Notice that if you leave blank the default sound value will be `default`.
- `icon('')`: Accepts a string value for the icon file. (Android Only)
- `badge(1)`: Accepts an integer value for the badge. (iOS Only)
- `setOption($key, $value)`: Allows you to set any value in the message payload. For more information [check here for iOS](https://pusher.com/docs/push_notifications/ios/server), [or here for Android](https://pusher.com/docs/push_notifications/android/server).

### Sending to multiple platforms

[](#sending-to-multiple-platforms)

You can send a single message to an iOS device and an Android device at the same time using the `withiOS()` and `withAndroid()` method:

```
public function toPushNotification($notifiable)
{
    $message = "Your {$notifiable->service} account was approved!";

    return PusherMessage::create()
        ->iOS()
        ->badge(1)
        ->body($message)
        ->withAndroid(
            PusherMessage::create()
                ->title($message)
                ->icon('icon')
        );
}
```

> - Notice that iOS is the default platform, which means you don't have to call `->iOS()`.
> - When using `withAndroid()` or `withiOS()` you don't have to define the platform, it's done behind the scenes for you.

### Routing a message

[](#routing-a-message)

By default the pusher "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`, however you can change this behaviour by including a `routeNotificationForPusherPushNotifications()` in the notifiable class method that returns the interest name.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mohamed Said](https://github.com/themsaid)
- [Marcel Pociot](https://github.com/mpociot)
- [Freek Van der Herten](https://github.com/freekmurze)
- [Sebastian De Deyne](https://github.com/sebastiandedeyne)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Recently: every ~204 days

Total

6

Last Release

2731d ago

Major Versions

0.0.1 → 1.0.02016-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cd981d08d894e44dd73e065bca587a8e1e2d61884bbac6964f6c4476ce6779c?d=identicon)[Claymm](/maintainers/Claymm)

---

Top Contributors

[![themsaid](https://avatars.githubusercontent.com/u/4332182?v=4)](https://github.com/themsaid "themsaid (39 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (19 commits)")[![ahxar](https://avatars.githubusercontent.com/u/2148793?v=4)](https://github.com/ahxar "ahxar (13 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (4 commits)")[![casperboone](https://avatars.githubusercontent.com/u/15815208?v=4)](https://github.com/casperboone "casperboone (2 commits)")[![fwartner](https://avatars.githubusercontent.com/u/6692500?v=4)](https://github.com/fwartner "fwartner (1 commits)")[![oyed](https://avatars.githubusercontent.com/u/172114265?v=4)](https://github.com/oyed "oyed (1 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (1 commits)")

---

Tags

laravelnotificationspusherpusher-push-notifications

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clementblanco-pusher-push-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/clementblanco-pusher-push-notifications/health.svg)](https://phpackages.com/packages/clementblanco-pusher-push-notifications)
```

###  Alternatives

[laravel-notification-channels/pusher-push-notifications

Pusher native Push Notifications driver.

282733.2k1](/packages/laravel-notification-channels-pusher-push-notifications)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[benwilkins/laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel

210964.1k1](/packages/benwilkins-laravel-fcm-notification)[neo/pusher-beams

Pusher Beams is a push notification service from Pusher.

133.1k](/packages/neo-pusher-beams)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
