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

1.1.0 2019-04-11 21:37 UTC

This package is auto-updated.

Last update: 2020-07-12 00:29:55 UTC


Latest Version on Packagist Build Status StyleCI Scrutinizer Code Quality Code Coverage Total Downloads

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.

Use case

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


  • PHP >= 7.1
  • Laravel >= 5.2 && < 5.8


Step 1

This package depends on owen-it/laravel-auditing:^8.0 and lab123it/aws-sns:dev-master, 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

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

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' => [

            // Or this if you want to queue the delivery of the message.
            // 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',


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 over the model in order to send a notification.


composer test


Please see Releases for more information what has changed recently.


Please see CONTRIBUTING for details.


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



The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.