New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

siabit/laravel-auditing-elasticsearch

A elasticsearch driver for the owen-it/laravel-auditing package. Allows storage of the audits in elasticsearch.
15,534

Larablocks Analysis

siabit/laravel-auditing-elasticsearch works with Laravel 11, 12 and 13 (latest release v1.3.0, May 12, 2026).

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (May 12, 2026)
  • 1,211 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Maintained
  • Last stable release: May 12, 2026.
  • 1 release in the last 12 months.
  • First released: Nov 17, 2023.
  • Monthly downloads: 1,211, up 139% from six months ago.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 26, 2026.

Install
composer require siabit/laravel-auditing-elasticsearch
Latest Version:v1.3.0
PHP:>=7.0
Laravel:11 · 12 · 13
License:MIT
Last Updated:May 12, 2026
Links: GitHub  ·  Packagist
Maintainer: igoooor

Auditing Elasticsearch Driver

Latest Unstable Version Total Downloads License

This driver provides the ability to save your model audits in elasticsearch.

Contents

Installation

This driver requires that you are using owen-it/laravel-auditing: ^7.0. Provided this is fulfilled, you can install the driver like so:

composer require iconscout/laravel-auditing-elasticsearch

Setup

You need to add the following config entries in config/audit.php if you need to change the default behaviour of the driver. The queue key of the config file should look like so:

    ...
    'queue' => env('AUDIT_QUEUE', true),
    ...

OR

    ...
    'queue' => env('AUDIT_QUEUE', [
        'queue' => 'default',
        'connection' => 'redis'
    ]),
    ...

The driver key of the config file should look like so:

    ...
    'driver' => Iconscout\Auditing\Drivers\ElasticSearch::class,
    ...

The drivers key of the config file should look like so:

    ...
    'drivers' => [
        'database' => [
            'table'      => 'audits',
            'connection' => null,
        ],
        'es' => [
            'client' => [
                'hosts' => [
                    env('AUDIT_HOST', 'localhost:9200')
                ]
            ],
            'index' => env('AUDIT_INDEX', 'laravel_auditing'),
            'type' => env('AUDIT_TYPE', 'audits')
        ],
    ],
    ...

Console commands

Available artisan commands are listed below:

Command | Arguments | Description --- | --- auditing:es-index | Index all of the model's records into the search index. auditing:es-delete | Delete all of the model's records from the index.

For detailed description and all available options run php artisan help [command] in the command line.

Usage

You can use the ElasticSearch driver in any Auditable model like so in order to store audit records in elasticsearch:

<?php
namespace App\Models;

use Iconscout\Auditing\Drivers\ElasticSearch;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Auditable;
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;

class SomeModel extends Model implements AuditableContract
{
    use Auditable;

    /**
     * ElasticSearch Audit Driver
     *
     * @var Iconscout\Auditing\Drivers\ElasticSearch
     */
    protected $auditDriver = ElasticSearch::class;

    // ...
}

You can use the ElasticSearchAuditable trait in any Auditable model like so in order to retrieving Retrieving audit records records from elasticsearch:

<?php
namespace App\Models;

use Iconscout\Auditing\Drivers\ElasticSearch;
use Iconscout\Auditing\Traits\ElasticSearchAuditable;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Auditable;
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;

class SomeModel extends Model implements AuditableContract
{
    use Auditable, ElasticSearchAuditable;

    /**
     * ElasticSearch Audit Driver
     *
     * @var Iconscout\Auditing\Drivers\ElasticSearch
     */
    protected $auditDriver = ElasticSearch::class;

    // ...
}
// Get first available Icon
$icon = Icon::first();

// Get all associated Audits
$all = $icon->esAudits;

// Get all associated Audits via parameters ($page & $perPage)
$all = $icon->esAudits($page = 1, $perPage = 10);

Donations

Help keeping the project development going, by contributing or donating a little. Thanks in advance.

Donate directly via Paypal

Donate

More information on using customer drivers with owen-it/laravel-auditing can be found on their homepage

Alternatives to siabit/laravel-auditing-elasticsearch

owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

46,608,560 3,475
rap2hpoutre/laravel-log-viewer

A Laravel log reader

16,889,053 3,192
venturecraft/revisionable

Keep a revision history for your models without thinking, created as a package f...

7,917,316 2,609
altek/accountant

The auditing & accountability package for Laravel's Eloquent ORM.

1,148,755 90
panoscape/history

Eloquent model history tracking for Laravel

161,677 163

Version History

Version Released PHP License
v1.3.0 >=7.0 MIT
v1.2 >=7.0 MIT
v1.1 >=7.0 MIT
v1.0 >=7.0 MIT