PHPackages                             andreshg112/laravel-auditing-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. andreshg112/laravel-auditing-notifications

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

andreshg112/laravel-auditing-notifications
==========================================

A notifications driver for the owen-it/laravel-auditing package. Allows sending notifications with audit data through custom channels.

1.4.0(2y ago)125641MITPHPPHP ^7.2

Since Apr 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/andreshg112/laravel-auditing-notifications)[ Packagist](https://packagist.org/packages/andreshg112/laravel-auditing-notifications)[ Docs](https://github.com/andreshg112/laravel-auditing-notifications)[ RSS](/packages/andreshg112-laravel-auditing-notifications/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (7)Versions (7)Used By (0)

Notification Driver for [Laravel Auditing](http://laravel-auditing.com) ^8.0
============================================================================

[](#notification-driver-for-laravel-auditing-80)

[![Latest Version on Packagist](https://camo.githubusercontent.com/82f5b7f31cce5b62c76b1551452de92b0579a5ea892427647e8494945ed1a20d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e6472657368673131322f6c61726176656c2d6175646974696e672d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andreshg112/laravel-auditing-notifications)[![Build Status](https://camo.githubusercontent.com/9dd9b3ad90dfb15b8e3a691e24705952254a1a4680455df94cebd2a798a73bcb/68747470733a2f2f7472617669732d63692e636f6d2f616e6472657368673131322f6c61726176656c2d6175646974696e672d6e6f74696669636174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/andreshg112/laravel-auditing-notifications)[![StyleCI](https://camo.githubusercontent.com/a3d1973dc0baf7467a24834d929f354f46b061dae267caf48663b627862970a2/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3137383935373136322f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/178957162)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b3fd6064292b8bfe4f488448a8cf3281048ec86b46259a74e04747abacabc385/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616e6472657368673131322f6c61726176656c2d6175646974696e672d6e6f74696669636174696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/andreshg112/laravel-auditing-notifications/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8a66f42097b621f96d68e776c535f9c3864e3b5a325e424985dc9ce8b45e4ac5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616e6472657368673131322f6c61726176656c2d6175646974696e672d6e6f74696669636174696f6e732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/andreshg112/laravel-auditing-notifications/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/11948404144c56370e1122cfe121054fe3f9eaa7963986da043d9b858f6a1d7e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e6472657368673131322f6c61726176656c2d6175646974696e672d6e6f74696669636174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andreshg112/laravel-auditing-notifications)

This package allows you to send notifications with audit data instead of saving it to an accessible database. By default, it sends notifications through AWS SNS using the package [lab123it/aws-sns](https://github.com/lab123it/aws-sns).

Use case
--------

[](#use-case)

If you have some microservices and want to have centralized auditing, this could be helpful.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- Laravel &gt;= 5.2 &amp;&amp; &lt; 5.8

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

[](#installation)

### Step 1

[](#step-1)

> This package depends on [owen-it/laravel-auditing:^8.0](https://github.com/owen-it/laravel-auditing) and [lab123it/aws-sns:dev-master](https://github.com/lab123it/aws-sns), so you have to install and configure them first in order to make this work.

You can install the package via composer:

```
composer require andreshg112/laravel-auditing-notifications
```

### Step 2

[](#step-2)

Change the audit default driver:

```
return [
    // ...
    /*
    |--------------------------------------------------------------------------
    | Audit Driver
    |--------------------------------------------------------------------------
    |
    | The default audit driver used to keep track of changes.
    |
    */

    'driver' => Andreshg112\LaravelAuditingNotifications\NotificationDriver::class,
];
```

> You can make this locally on a model. Please see the documentation: .

### Step 3

[](#step-3)

In your `config/audit.php` file, add this:

```
return [
    // ...

    // andreshg112/laravel-auditing-notifications

    'notification-driver' => [
        // Required if you're going to use different notifications channels for sending audit data.
        'notifications' => [
            Andreshg112\LaravelAuditingNotifications\AuditSns::class,

            // Or this if you want to queue the delivery of the message.
            // https://laravel.com/docs/5.2/queues
            // Andreshg112\LaravelAuditingNotifications\AuditSnsQueue::class,
        ],

        // Required if you're going to use the default Andreshg112\LaravelAuditingNotifications\AuditSns Notification.
        'sns' => [
            'topic_arn' => 'arn:aws:sns:us-east-1:xxxxxxxxxxxx:auditing-notifications',
        ],
    ],
];
```

Usage
-----

[](#usage)

Add the `Illuminate\Notifications\Notifiable` trait to the models you want to audit, besides Auditable contract and trait.

```
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;

class Vehicle extends Model implements \OwenIt\Auditing\Contracts\Auditable
{
    use \OwenIt\Auditing\Auditable, Notifiable;
}
```

That's all! Just execute an [auditable event](http://laravel-auditing.com/docs/8.0/audit-events) over the model in order to send a notification.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [Releases](../../releases) for more information 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)

- [Andrés Herrera García](https://github.com/andreshg112)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~409 days

Total

5

Last Release

962d ago

PHP version history (2 changes)1.0.0PHP ^7.1

1.4.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5035725cb99badcda1bac670e2ec5808d31ff98c9144e278fbff399fed1bb594?d=identicon)[andreshg112](/maintainers/andreshg112)

---

Top Contributors

[![andreshg112](https://avatars.githubusercontent.com/u/15859884?v=4)](https://github.com/andreshg112 "andreshg112 (14 commits)")

---

Tags

aws-snslaravellaravel-auditinglaravel-notificationsnotificationsphpandreshg112laravel-auditing-notifications

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andreshg112-laravel-auditing-notifications/health.svg)

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

###  Alternatives

[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[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/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[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)[illuminate/mail

The Illuminate Mail package.

5910.1M391](/packages/illuminate-mail)

PHPackages © 2026

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