PHPackages                             pestopancake/laravel-backpack-database-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. pestopancake/laravel-backpack-database-notifications

ActiveLibrary

pestopancake/laravel-backpack-database-notifications
====================================================

Database notifications interface for Laravel Backpack

1.0.10(1y ago)1811.4k↓33.9%8[1 issues](https://github.com/pestopancake/laravel-backpack-database-notifications/issues)MITPHP

Since Jan 26Pushed 1y ago3 watchersCompare

[ Source](https://github.com/pestopancake/laravel-backpack-database-notifications)[ Packagist](https://packagist.org/packages/pestopancake/laravel-backpack-database-notifications)[ Docs](https://github.com/pestopancake/laravel-backpack-notifications)[ RSS](/packages/pestopancake-laravel-backpack-database-notifications/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (17)Used By (0)

Laravel Backpack Database Notifications
=======================================

[](#laravel-backpack-database-notifications)

[![Packagist Version](https://camo.githubusercontent.com/37d3e53d92fe0f321af5232cebbf57202a587244baff88cb981d92ea64d73c5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706573746f70616e63616b652f6c61726176656c2d6261636b7061636b2d64617461626173652d6e6f74696669636174696f6e73)](https://packagist.org/packages/pestopancake/laravel-backpack-database-notifications) [![Build Status](https://camo.githubusercontent.com/1313423ea349ef982d51f2ffa5861563847982a912cf345132d0aa78090f8ba4/68747470733a2f2f6170702e7472617669732d63692e636f6d2f706573746f70616e63616b652f6c61726176656c2d6261636b7061636b2d64617461626173652d6e6f74696669636174696f6e732e7376673f6272616e63683d6d61696e)](https://app.travis-ci.com/pestopancake/laravel-backpack-database-notifications) [![StyleCI](https://camo.githubusercontent.com/67ba51c99e1094f0812745ee8f2becdb567d40b631d453795a570a834b74ef06/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3333333231383534332f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/333218543?branch=main)

Easily add an admin interface for standard Laravel database notifications. This package includes:

- a sidebar item, with an optional notification count for the current user (refreshed with AJAX every second)
- an interface that shows the notifications in the database for the current user, with their (optional) action buttons;

The only thing left for you to do is to actually trigger notifications for your admins, wherever you want, using the standard Laravel syntax (example below).

[![](https://raw.githubusercontent.com/pestopancake/laravel-backpack-database-notifications/main/preview.gif)](https://raw.githubusercontent.com/pestopancake/laravel-backpack-database-notifications/main/preview.gif)

Prerequisites
-------------

[](#prerequisites)

- Have Laravel Backpack installed [backpack/crud](https://github.com/Laravel-Backpack/CRUD) v4.0.\* | 4.1.\*
- Follow the steps for laravel's [database notifications prerequisites](https://laravel.com/docs/8.x/notifications#database-notifications), e.g:

```
php artisan notifications:table
php artisan migrate

```

- Have Permission Manager installed [Laravel-Backpack/PermissionManager](https://github.com/Laravel-Backpack/PermissionManager)

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

[](#installation)

### Backpack v5 / v6

[](#backpack-v5--v6)

```
composer require pestopancake/laravel-backpack-database-notifications

```

### Backpack v4

[](#backpack-v4)

```
composer require pestopancake/laravel-backpack-database-notifications:1.0.6

```

Usage
-----

[](#usage)

Publish the config file:

```
php artisan vendor:publish --provider="Pestopancake\\LaravelBackpackNotifications\\LaravelBackpackNotificationsServiceProvider" --tag=config

```

### Show in side menu

[](#show-in-side-menu)

Add a menu item to your 'resources/views/vendor/backpack/base/inc/sidebar\_content.blade.php' by running:

```
php artisan backpack:add-menu-content "@include('backpack-database-notifications::sidebarMenuItem')"

```

### Admin view

[](#admin-view)

With the [Permission Manager](https://github.com/Laravel-Backpack/PermissionManager) package installed you can assign the permission 'notifications admin' to users for them to see admin functionality.

To change the permission name edit 'admin\_permission\_name' in the databasenotifications config file.

Currently users with the admin permission can see/dismiss notifications for all users.

### Create a notification

[](#create-a-notification)

#### Use the included generic notification

[](#use-the-included-generic-notification)

```
use Pestopancake\LaravelBackpackNotifications\Notifications\DatabaseNotification;

$user = backpack_user();
$user->notify(new DatabaseNotification(
    $type = 'info', // info / success / warning / error
    $message = 'Test Notification',
    $messageLong = 'This is a longer message for the test notification '.rand(1, 99999), // optional
    $href = '/some-custom-url', // optional, e.g. backpack_url('/example')
    $hrefText = 'Go to custom URL' // optional
));
```

#### Use in any other notification

[](#use-in-any-other-notification)

The toArray method of the notification should be in this format:

```
return [
    'type' => "info", // info / success / warning / error
    'message' => "",
    'message_long' => "", // optional
    'action_href' => "", // optional, e.g. backpack_url('/example')
    'action_text' => "", // optional
];
```

The type will affect the colour of the toast notification (if toasts are enabled in the config)

Troubleshooting
---------------

[](#troubleshooting)

### Notification not created

[](#notification-not-created)

- Make sure the model you are notifying matches the model defined in your backpack config at backpack.base.user\_model\_fqn (found in config/backpack/base.php)

Change log
----------

[](#change-log)

See the [changelog](/pestopancake/laravel-backpack-database-notifications/blob/main/changelog.md) for more information on what has changed recently.

Todo
----

[](#todo)

- Add unit tests
- translatable text
- notification preferences

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 79% 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 ~117 days

Recently: every ~218 days

Total

13

Last Release

527d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4de5b02cda0505ba986a6982ea5223210058651a9c90e19f5f6f471324a4cc69?d=identicon)[pestopancake](/maintainers/pestopancake)

---

Top Contributors

[![pa-ulmart-in](https://avatars.githubusercontent.com/u/243551531?v=4)](https://github.com/pa-ulmart-in "pa-ulmart-in (49 commits)")[![tabacitu](https://avatars.githubusercontent.com/u/1032474?v=4)](https://github.com/tabacitu "tabacitu (6 commits)")[![laszlo-dashrocks](https://avatars.githubusercontent.com/u/121850852?v=4)](https://github.com/laszlo-dashrocks "laszlo-dashrocks (3 commits)")[![pestopancake](https://avatars.githubusercontent.com/u/596881?v=4)](https://github.com/pestopancake "pestopancake (2 commits)")[![arb362](https://avatars.githubusercontent.com/u/6188411?v=4)](https://github.com/arb362 "arb362 (1 commits)")[![spoyntersmith](https://avatars.githubusercontent.com/u/22387308?v=4)](https://github.com/spoyntersmith "spoyntersmith (1 commits)")

---

Tags

laravelnotificationslaravel backpackdatabase notifications

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pestopancake-laravel-backpack-database-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/pestopancake-laravel-backpack-database-notifications/health.svg)](https://phpackages.com/packages/pestopancake-laravel-backpack-database-notifications)
```

###  Alternatives

[backpack/langfilemanager

An interface to edit language files, for Laravel Backpack.

91230.1k1](/packages/backpack-langfilemanager)[coreproc/nova-notification-feed

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

10149.1k](/packages/coreproc-nova-notification-feed)[izica/relations-widgets-for-backpack

Widgets for preview model relations in laravel backpack

2927.3k](/packages/izica-relations-widgets-for-backpack)[revolution/laravel-bluesky

Bluesky(AT Protocol) for Laravel

4317.3k](/packages/revolution-laravel-bluesky)[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)
