PHPackages                             yassir3wad/nova-realtime-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. yassir3wad/nova-realtime-notification

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

yassir3wad/nova-realtime-notification
=====================================

This package adds real-time notification broadcasting capabilities to Laravel Nova Notifications.

v1.0.2(1y ago)32.1k[3 PRs](https://github.com/yassir3wad/nova-realtime-notification/pulls)MITPHPPHP ^7.3|^8.0CI passing

Since Jul 20Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/yassir3wad/nova-realtime-notification)[ Packagist](https://packagist.org/packages/yassir3wad/nova-realtime-notification)[ GitHub Sponsors](https://github.com/:vendor_name)[ RSS](/packages/yassir3wad-nova-realtime-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (7)Used By (0)

Laravel Nova Real-time Notification Broadcasting
================================================

[](#laravel-nova-real-time-notification-broadcasting)

This package adds real-time notification broadcasting capabilities to Laravel Nova Notifications, seamlessly integrating with Laravel Nova.

Features
--------

[](#features)

- Real-time notifications broadcasting using Laravel Echo.
- Seamless integration with Laravel Nova.
- Configurable broadcast channels and events.
- Option to play sound on receiving notifications.

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

[](#installation)

### Requirements

[](#requirements)

- Laravel Nova 4.x or higher

### Steps

[](#steps)

1. Install the package via Composer:

    ```
    composer require yassir3wad/nova-realtime-notification
    ```
2. Publish the package configuration:

    ```
    php artisan vendor:publish --provider="Yassir3wad\NovaRealtimeNotification\ToolServiceProvider"
    ```
3. Configure your broadcasting settings in `config/broadcasting.php`. Ensure you have the necessary drivers (e.g., Pusher, Redis, etc.) configured.

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

[](#configuration)

The package configuration can be found in `config/nova-realtime-notification.php`. You can customize the following settings:

- `enabled`: Enable/disable real-time notifications.
- `broadcast_driver`: The broadcast driver to be used (e.g., `pusher`, `reverb`).
- `broadcast_channel`: The private broadcast channel for notifications. Supported values are `App.Models.User`, `App.Models.Provider`, and `App.Models.Customer`.
- `enable_sound`: Enable/disable sound for notifications.
- `sound_path`: The path to the sound file in your public directory.

Example configuration (`config/nova-realtime-notification.php`):

```
return [
    'enabled' => true,
    'broadcast_driver' => 'pusher',
    'broadcast_channel' => 'App.Models.User',
    'enable_sound' => true,
    'sound_path' => 'sounds/sound1.mp3',
];
```

Usage
-----

[](#usage)

### Broadcasting Notifications

[](#broadcasting-notifications)

1. Create a new notification:

    ```
    php artisan make:notification AdminNotification
    ```
2. Implement the `via`, `toNova`, and `toBroadcast` methods in your notification class where you have `NovaChannel`, and add `broadcast` to the `via` method:

    ```
    namespace App\Notifications;

    use Illuminate\Bus\Queueable;
    use Illuminate\Contracts\Queue\ShouldQueue;
    use Illuminate\Notifications\Messages\BroadcastMessage;
    use Illuminate\Notifications\Notification;
    use Laravel\Nova\Notifications\NovaChannel;
    use Laravel\Nova\Notifications\NovaNotification;

    class AdminNotification extends Notification implements ShouldQueue
    {
        use Queueable;

        private $message;
        private $actionPath;
        private $actionLabel;
        private $level;

        public function __construct($message, $actionPath, $actionLabel, $level)
        {
            $this->message = $message;
            $this->actionPath = $actionPath;
            $this->actionLabel = $actionLabel;
            $this->level = $level;
        }

        public function via($notifiable)
        {
            return [NovaChannel::class, 'broadcast'];
        }

        public function toNova()
        {
            return (new NovaNotification)
                ->message($this->message)
                ->action($this->actionLabel, $this->actionPath)
                ->icon('bell')
                ->type($this->level);
        }

        public function toBroadcast(object $notifiable): BroadcastMessage
        {
            return new BroadcastMessage([
                'message' => $this->message,
                'action_label' => $this->actionLabel,
                'action_path' => $this->actionPath,
                'level' => $this->level,
                'duration' => 7000,
            ]);
        }
    }
    ```
3. Trigger the notification from your application logic:

    ```
    use App\Notifications\AdminNotification;
    use App\Models\User;

    $user = User::find(1);
    $user->notify(new AdminNotification('You have a new admin message!', '/admin/messages', 'View', 'info'));
    ```

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

[](#contributing)

Thank you for considering contributing to the Laravel Nova Real-time Notification Broadcasting package! Please read the [contribution guidelines](CONTRIBUTING.md) for details.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.md).

Screenshots
===========

[](#screenshots)

[![Nova Real-time Notification](https://github.com/yassir3wad/nova-realtime-notification/raw/main/screenshot1.png)](https://github.com/yassir3wad/nova-realtime-notification/blob/main/screenshot1.png)[![Nova Real-time Notification](https://github.com/yassir3wad/nova-realtime-notification/raw/main/screenshot2.png)](https://github.com/yassir3wad/nova-realtime-notification/blob/main/screenshot2.png)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance66

Regular maintenance activity

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

3

Last Release

659d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51bc44dbc0932caf1d5d6bbe88f18fac62bffbb6e86ea3677aa7e99435179a32?d=identicon)[yassir3wad](/maintainers/yassir3wad)

---

Top Contributors

[![yassir3wad](https://avatars.githubusercontent.com/u/31948375?v=4)](https://github.com/yassir3wad "yassir3wad (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelnotificationBroadcastingnova

### Embed Badge

![Health badge](/badges/yassir3wad-nova-realtime-notification/health.svg)

```
[![Health](https://phpackages.com/badges/yassir3wad-nova-realtime-notification/health.svg)](https://phpackages.com/packages/yassir3wad-nova-realtime-notification)
```

###  Alternatives

[coreproc/nova-notification-feed

A Laravel Nova package that adds a notification feed in your Nova app.

10149.1k](/packages/coreproc-nova-notification-feed)[naif/nova-push-notification

A Laravel Nova tool to send push notifications via OneSignal

166.4k](/packages/naif-nova-push-notification)

PHPackages © 2026

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