PHPackages                             coreproc/nova-notification-feed - 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. coreproc/nova-notification-feed

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

coreproc/nova-notification-feed
===============================

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

1.4.0(6y ago)10149.1k↑125%23[17 PRs](https://github.com/CoreProc/nova-notification-feed/pulls)MITVuePHP &gt;=7.1.0

Since Jan 30Pushed 3y ago7 watchersCompare

[ Source](https://github.com/CoreProc/nova-notification-feed)[ Packagist](https://packagist.org/packages/coreproc/nova-notification-feed)[ RSS](/packages/coreproc-nova-notification-feed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (22)Used By (0)

Nova Notification Feed
======================

[](#nova-notification-feed)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f2e13d3d406d54ca102c3d5c1380daf9e662d7123f6c786959417368cb447cad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f726570726f632f6e6f76612d6e6f74696669636174696f6e2d666565642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/nova-notification-feed)[![Quality Score](https://camo.githubusercontent.com/05806987acca937fc735a4418e930783dc77edc33d8c23b5dd44f28eff59eb45/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636f726570726f632f6e6f76612d6e6f74696669636174696f6e2d666565642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/coreproc/nova-notification-feed)[![Total Downloads](https://camo.githubusercontent.com/9d3be844d836bfea6b19cbcf78194a19890e69efc3f3c3079b70c2e683c7a243/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f726570726f632f6e6f76612d6e6f74696669636174696f6e2d666565642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/coreproc/nova-notification-feed)

A Laravel Nova package that adds a notification feed in your Nova app and uses Laravel Echo and websockets to receive and broadcast notifications.

[![](nova-notification-feed.gif)](nova-notification-feed.gif)

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

[](#installation)

You can install the package into a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require coreproc/nova-notification-feed
```

This package makes use of Laravel's database notification feature and [Nova Echo](https://github.com/CoreProc/nova-echo) to receive and broadcast notifications.

By using [Nova Echo](https://github.com/CoreProc/nova-echo), we have a readily configured Laravel Echo instance in our JS.

Here are the suggested options for broadcasting/receiving using websockets:

- [Pusher](https://pusher.com)
- [Laravel Websockets](https://docs.beyondco.de/laravel-websockets/)
- [Laravel Echo Server](https://github.com/tlaverdure/laravel-echo-server)

Make sure that you already have any of these options set up and prepare your Laravel project to use it for broadcasting notifications.

You can find instructions about broadcasting in Laravel using the [official documentation](https://laravel.com/docs/5.7/broadcasting).

Follow the docs, make sure to run the following to get the `notifications` table if you have not done so already:

```
php artisan notifications:table

php artisan migrate

```

Before broadcasting any events, you will first need to register the `App\Providers\BroadcastServiceProvider`. In fresh Laravel applications, you only need to uncomment this provider in the `providers` array of your `config/app.php` configuration file. This provider will allow you to register the broadcast authorization routes and callbacks.

Make sure that you configure the correct environment variables in your `.env` file:

```
BROADCAST_DRIVER=pusher

PUSHER_APP_ID=xxxxxxx
PUSHER_APP_KEY=xxxxxxx
PUSHER_APP_SECRET=xxxxxx
PUSHER_APP_CLUSTER=xxx

```

You will also need to ensure that you have added an authorization broadcast route in `routes/channels.php`:

```
Broadcast::channel('App.User.{id}', function ($user, $id) {
    return (int)$user->id === (int)$id;
});
```

Receiving notifications will depend on your `User` model having the `Notifiable` trait. You can add the `receivesBroadcastNotificationsOn` to use a different channel name instead of the user model's namespace.

```
class User extends Authenticatable
{
    use Notifiable;

    ...

    /**
     * The channels the user receives notification broadcasts on.
     *
     * @return string
     */
    public function receivesBroadcastNotificationsOn()
    {
        return 'users.' . $this->id;
    }
}
```

Finally, once you have ensured that this is set up, you will also need to override Nova's `layout.blade.php`. Create a layout file in `resources/views/vendor/nova/layout.blade.php` and copy the contents from `vendor/laravel/nova/resources/views/layout.blade.php`.

Add these two lines to the layout template:

```
// file: resources/views/vendor/nova/layout.blade.php

  @include('nova-echo::meta')

  ...

    @include('nova::partials.user')

  @include('nova_notification_feed::notification_feed')

  ...

```

You should now be able to see the notification bell on the top right of your Nova UI.

Usage
-----

[](#usage)

To broadcast notifications to your notification feed in the Nova app, you can make a notification class that sends notifications via `database` and `broadcast`. Here is an example notification class:

```
use Coreproc\NovaNotificationFeed\Notifications\NovaBroadcastMessage;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\BroadcastMessage;
use Illuminate\Notifications\Notification;

class TestNotification extends Notification
{
    use Queueable;

    protected $level = 'info';
    protected $message = '';

    /**
     * Create a new notification instance.
     *
     * @param $level
     * @param $message
     */
    public function __construct($level, $message = 'Test message')
    {
        $this->level = $level;
        $this->message = $message;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed $notifiable
     * @return array
     */
    public function via($notifiable)
    {
        return [
            'database',
            'broadcast',
        ];
    }

    /**
     * Get the array representation of the notification.
     *
     * @param  mixed $notifiable
     * @return array
     */
    public function toArray($notifiable)
    {
        return [
            'level' => $this->level,
            'message' => $this->message,
            'url' => 'https://coreproc.com',
            'target' => '_self'
        ];
    }

    /**
     * Get the broadcastable representation of the notification.
     *
     * @param  mixed $notifiable
     * @return BroadcastMessage
     */
    public function toBroadcast($notifiable)
    {
        return new NovaBroadcastMessage($this->toArray($notifiable));
    }
}
```

Nova Notification Feed relies on having three variables passed in the `toArray()` method of the notification class: `level`, `message`, and `url`, and an optional `target` (default: `'_blank'`).

Additionally, you can use the `NovaBroadcastMessage` class in the `toBroadcast()` method to ensure that the format of the broadcast can be read by the frontend.

Roadmap
-------

[](#roadmap)

- Differentiate background color of a new notification
- Check if the URL is an JSON representation of a route `{ name: 'index', params: {} }`
- Better design?

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Chris Bautista](https://github.com/chrisbjr)

About CoreProc
--------------

[](#about-coreproc)

CoreProc is a software development company that provides software development services to startups, digital/ad agencies, and enterprises.

Learn more about us on our [website](https://coreproc.com).

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~83 days

Recently: every ~102 days

Total

6

Last Release

2250d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7066371?v=4)[CoreProc](/maintainers/coreproc)[@CoreProc](https://github.com/CoreProc)

---

Top Contributors

[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![Naoray](https://avatars.githubusercontent.com/u/10154100?v=4)](https://github.com/Naoray "Naoray (3 commits)")[![4n70w4](https://avatars.githubusercontent.com/u/38257723?v=4)](https://github.com/4n70w4 "4n70w4 (1 commits)")[![HenriqueSPin](https://avatars.githubusercontent.com/u/12719645?v=4)](https://github.com/HenriqueSPin "HenriqueSPin (1 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

---

Tags

laravelnotificationsnovasidebarBroadcastnotice boardbell

### Embed Badge

![Health badge](/badges/coreproc-nova-notification-feed/health.svg)

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

###  Alternatives

[ascsoftw/livewire-toast

Livewire Package to display Toast Notifications

48544.2k1](/packages/ascsoftw-livewire-toast)[naif/nova-push-notification

A Laravel Nova tool to send push notifications via OneSignal

166.4k](/packages/naif-nova-push-notification)[sarfraznawaz2005/laravel-sse

Laravel package to provide Server Sent Events functionality for your app.

474.6k](/packages/sarfraznawaz2005-laravel-sse)[usamamuneerchaudhary/filament-notifier

A powerful notification system for FilamentPHP that handles multi-channel notifications with template management, scheduling, and real-time delivery. Built for developers who need enterprise-grade notifications without the complexity.

321.1k](/packages/usamamuneerchaudhary-filament-notifier)

PHPackages © 2026

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