PHPackages                             waarborg/databasenotifications - 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. [Database &amp; ORM](/categories/database)
4. /
5. waarborg/databasenotifications

ActiveLibrary[Database &amp; ORM](/categories/database)

waarborg/databasenotifications
==============================

Database notifications driver for Laravel 5.3 and up

v2.0(3y ago)07MITPHPPHP ^8.0

Since Feb 5Pushed 3y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

Database Notification Channel for Laravel 6
===========================================

[](#database-notification-channel-for-laravel-6)

[![Latest Version on Packagist](https://camo.githubusercontent.com/299d38aa615876d709709dfa522c538b3afcf093ae03dacfe9d7dfa256dc24c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77616172626f72672f64617461626173656e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/godforhire/databasenotifications)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/cda85e971794ab373b8095d1b18964ab088bd965f010736484b2da0e1920e433/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77616172626f72672f64617461626173656e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/godforhire/databasenotifications)

This package makes it easy to send database notifications with Laravel 6 and up from third-party packages. Those often allow you to send mail or slack notifications, but with this package you can also send them to the notification table. For others, simply use Laravel's own notifications.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [License](#license)

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

[](#installation)

You can install the package via composer:

```
composer require waarborg/databasenotifications
```

Usage
-----

[](#usage)

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

```
use waarborg\DatabaseNotifications\DatabaseChannel;
use waarborg\DatabaseNotifications\DatabaseMessage;
use Illuminate\Notifications\Notification;

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

    public function toDatabase($notifiable)
    {
        return DatabaseMessage::create()
                    ->user(1)
                    ->data([
                        'event' => 'Backup failed',
                    	'description' => 'Daily backup of Your App has failed: reason, disk S3 is unreachable.',
                    	'...' => '...'
                    ]);
    }
}
```

### Available Message methods

[](#available-message-methods)

- `user` The user to send the notification to.
- `data` An array with custom fields. This can contain any key value pair you want.

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

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 55.6% 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 ~664 days

Total

4

Last Release

1391d ago

Major Versions

1.0.2 → v2.02022-07-21

PHP version history (2 changes)v1.0.0PHP &gt;=5.6.4

v2.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![waarborg](https://avatars.githubusercontent.com/u/52655342?v=4)](https://github.com/waarborg "waarborg (5 commits)")[![godforhire](https://avatars.githubusercontent.com/u/1974013?v=4)](https://github.com/godforhire "godforhire (4 commits)")

### Embed Badge

![Health badge](/badges/waarborg-databasenotifications/health.svg)

```
[![Health](https://phpackages.com/badges/waarborg-databasenotifications/health.svg)](https://phpackages.com/packages/waarborg-databasenotifications)
```

###  Alternatives

[cyrildewit/eloquent-viewable

Laravel package that allows you to associate views with Eloquent models

8831.1M6](/packages/cyrildewit-eloquent-viewable)[jerome/filterable

Streamline dynamic Eloquent query filtering with seamless API request integration and advanced caching strategies.

19226.1k](/packages/jerome-filterable)[hyperf/database

A flexible database library.

202.8M257](/packages/hyperf-database)[alajusticia/laravel-expirable

Make Eloquent models expirable

2193.4k5](/packages/alajusticia-laravel-expirable)

PHPackages © 2026

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