PHPackages                             pushmix/laravel-web-notification - 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. pushmix/laravel-web-notification

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

pushmix/laravel-web-notification
================================

Pushmix Notification Driver for Laravel

1.6(6y ago)561MITPHPPHP &gt;=7.2.0CI failing

Since Oct 21Pushed 6y ago1 watchersCompare

[ Source](https://github.com/pushmix/laravel-web-notification)[ Packagist](https://packagist.org/packages/pushmix/laravel-web-notification)[ Docs](https://github.com/pushmix/laravel-web-notification)[ RSS](/packages/pushmix-laravel-web-notification/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (17)Used By (0)

[![Pushmix](https://camo.githubusercontent.com/346b3a0c03827c1a04cd7b1a52f94fd632b0d501a4b18914d5c277e7c849d4db/68747470733a2f2f7777772e707573686d69782e636f2e756b2f6d656469612f66617669636f6e732f66617669636f6e2d33327833322e706e67)](https://camo.githubusercontent.com/346b3a0c03827c1a04cd7b1a52f94fd632b0d501a4b18914d5c277e7c849d4db/68747470733a2f2f7777772e707573686d69782e636f2e756b2f6d656469612f66617669636f6e732f66617669636f6e2d33327833322e706e67) Pushmix Notifications Driver for Laravel 6
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-pushmix-notifications-driver-for-laravel-6)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8b6334a96847ab03b148ac66d3e4022dc37991ed0ef57e4e0bcf965eaea75292/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707573686d69782f6c61726176656c2d7765622d6e6f74696669636174696f6e2e737667)](https://packagist.org/packages/pushmix/laravel-web-notification)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/c5834b7301538ea76302403692c7790f005cf701c506624e1d85d5e4ae10128a/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135333839363539382f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/153896598)[![Build Status](https://camo.githubusercontent.com/5c724e2da5079b8f26b65eec215a6e29b93529ae67784ba5223cc90113229b3b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f707573686d69782f6c61726176656c2d7765622d6e6f74696669636174696f6e2f6d61737465722e737667)](https://travis-ci.org/lpushmix/laravel-web-notification)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5f4ef03eaf8ddef1079258e7af13a8d9487740cbda6596b92e808701c5ceea51/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f707573686d69782f6c61726176656c2d7765622d6e6f74696669636174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pushmix/laravel-web-notification/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/3e2c82f16b804bac2fcff9ea41a5b32c542d6b769d9e99691c45fff234878408/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f707573686d69782f6c61726176656c2d7765622d6e6f74696669636174696f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pushmix/laravel-web-notification/?branch=master)[![Code Intelligence Status](https://camo.githubusercontent.com/69f979b2e7834926180fdb75e8f3cdbbfbf1f9bacd134522d256641ff91582db/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f707573686d69782f6c61726176656c2d7765622d6e6f74696669636174696f6e2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

About
-----

[](#about)

This package makes it easy to send [Pushmix notifications](https://www.pushmix.co.uk/docs/laravel-package) with Laravel 6

Contents
--------

[](#contents)

- [Setting up your Pushmix account](#setting-up-your-pushmix-account)
- [Installation](#installation)
    - [Configuration](#configuration)
- [Displaying Opt In Prompt](#displaying-opt-in-prompt)
- [Usage](#usage)
    - [Available Message methods](#all-available-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Issues](#issues)
- [Security Vulnerabilities](#security-vulnerabilities)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Setting up your Pushmix account
-------------------------------

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

If you haven't already, sign up for a free account on [pushmix.co.uk](https://dash.pushmix.co.uk/register).

[Create new subscription](https://www.pushmix.co.uk/docs/create-subscription) for your website and choose preferred [integration method](https://www.pushmix.co.uk/docs/installation). Build your subscribers audience via displaying an Opt-In Prompt asking users for permission to send them push notifications.

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

[](#installation)

You can install the package via composer:

```
$ composer require pushmix/laravel-web-notification:dev-master
```

If you're installing the package in Laravel 5.4 or lower, you must import the service provider:

```
// config/app.php
'providers' => [
    ...
    Pushmix\WebNotification\PushmixServiceProvider::class,
],
```

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

[](#configuration)

Publish package config and view files:

```
php artisan vendor:publish --provider="Pushmix\WebNotification\PushmixServiceProvider"
```

Add your Subscription ID into `.env` file:

```
PUSHMIX_SUBSCRIPTION_ID=PASTE_YOUR_SUBSCRIPTION_ID_HERE
```

Displaying Opt In Prompt
------------------------

[](#displaying-opt-in-prompt)

To display Opt-In Prompt you will need to include block of JavaScript into your template using Blade `@include` directive.

Alternatively you can copy and paste content of `vendor.pushmix.optin` into template.

```

        ...

                    Laravel

        @include('vendor.pushmix.optin')

    ...
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use Pushmix\WebNotification\PushmixChannel;
use Pushmix\WebNotification\PushmixMessage;
use Illuminate\Notifications\Notification;

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

		public function toPushmix($to)
    {

      return PushmixMessage::create($to)
		  /* Required Parameters */
          ->title("You still have items in your Cart!")
          ->body("There's still time to complete your order. Return to your cart?")
          ->url("https://www.pushmix.co.uk")

		  /* Optional Parameters */
          ->button("Return to your cart", "https://www.pushmix.co.uk/docs") // button one
          ->priority("high")
          ->ttl(7200) // time to live
          ->icon("https://www.pushmix.co.uk/media/favicons/apple-touch-icon.png")
          ->badge("https://www.pushmix.co.uk/media/favicons/pm_badge_v2.png")
          ->image("https://www.pushmix.co.uk/media/photos/photo16.jpg");
    }
}
```

The notifications will be sent to the audience, which subscribed via Opt-In Prompt displayed on your website. Using the `Notification::route` method, you can specify which subscribers group you are targeting.

```
use Notification;
use App\Notifications\AbandonedCart;
...
// Target All Subscribed Users
Notification::route('Pushmix', 'all')->notify(new AbandonedCart());

// Target Topic One Subscribers
Notification::route('Pushmix', 'one')->notify(new AbandonedCart());

// Target Topic Two Subscribers
Notification::route('Pushmix', 'two')->notify(new AbandonedCart());
```

### All available methods

[](#all-available-methods)

[Pushmix documentation](https://www.pushmix.co.uk/docs/api)

- `title('')`: Accepts a string value for the title, required\*
- `body('')`: Accepts a string value for the notification body,required\*
- `url('')`: Accepts an url for the notification click event,required\*
- `button('', '')`: Accepts string value for button title and an url for the notification click event. Max 2 buttons can be attached.
- `icon('')`: Accepts an url for the icon.
- `priority('')`: Accepts `high` or `normal` strings.
- `ttl('')`: Accepts an integer, notification life span in seconds,must be from 0 to 2,419,200
- `icon('')`: Accepts an url for the icon.
- `badge('')`: Accepts an url for the badge.
- `image('')`: Accepts an url for the large image.

Testing
-------

[](#testing)

Navigate into the package folder `vendor/pushmix/laravel-web-notification` and issue following command:

```
$ composer test
```

Issues
------

[](#issues)

If you come across any issues please report them [here](https://github.com/pushmix/laravel-web-notification/issues).

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability please send an e-mail to .

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Alexander Pechkarev](https://github.com/alexpechkarev)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 73% of commits — single point of failure

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 ~27 days

Recently: every ~0 days

Total

13

Last Release

2430d ago

Major Versions

v0.3 → v1.0.02019-01-26

1.2 → 5.5.x-dev2019-09-13

1.3 → 5.6.x-dev2019-09-13

1.4 → 5.8.x-dev2019-09-13

PHP version history (3 changes)v1.0.0PHP &gt;=7.0.0

5.7.x-devPHP &gt;=7.1.3

1.6PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5f43cf2656aa1b488f2938a1251b9af44c0d8bbb492a3d323fe91a9a28453ad?d=identicon)[pushmix](/maintainers/pushmix)

---

Top Contributors

[![alexpechkarev](https://avatars.githubusercontent.com/u/5559162?v=4)](https://github.com/alexpechkarev "alexpechkarev (27 commits)")[![pushmix](https://avatars.githubusercontent.com/u/44176199?v=4)](https://github.com/pushmix "pushmix (10 commits)")

---

Tags

laravel-5-packagelaravel-notification-channelspushmixweb-notifcations-apiweb-notificationsweb notificationslaravel-notification-channelspushmixlaravel notifications driver

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pushmix-laravel-web-notification/health.svg)

```
[![Health](https://phpackages.com/badges/pushmix-laravel-web-notification/health.svg)](https://phpackages.com/packages/pushmix-laravel-web-notification)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/fcm

FCM (Firebase Cloud Messaging) Notifications Driver for Laravel

5917.0M16](/packages/laravel-notification-channels-fcm)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/aws-sns

Amazon Simple Notification Service (AWS SNS) notification channel for Laravel.

541.1M2](/packages/laravel-notification-channels-aws-sns)

PHPackages © 2026

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