PHPackages                             slavcodev/laravel-event-recorder - 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. slavcodev/laravel-event-recorder

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

slavcodev/laravel-event-recorder
================================

Laravel Eloquent event recorder

0.1.0(2y ago)01.7kMITPHPPHP ~7.3 || ~8.0

Since Mar 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/slavcodev/laravel-event-recorder)[ Packagist](https://packagist.org/packages/slavcodev/laravel-event-recorder)[ RSS](/packages/slavcodev-laravel-event-recorder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Laravel Eloquent event recorder
===============================

[](#laravel-eloquent-event-recorder)

[![phpunit](https://github.com/slavcodev/laravel-event-recorder/workflows/phpunit/badge.svg)](https://github.com/slavcodev/laravel-event-recorder)[![psalm](https://github.com/slavcodev/laravel-event-recorder/workflows/psalm/badge.svg)](https://github.com/slavcodev/laravel-event-recorder)[![php-cs-fixer](https://github.com/slavcodev/laravel-event-recorder/workflows/php-cs-fixer/badge.svg)](https://github.com/slavcodev/laravel-event-recorder)[![Latest Version](https://camo.githubusercontent.com/8466d75f67a637cfcd0c25a87877c17fdf6ca146af0bb345a6830765699b4f8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f736c6176636f6465762f6c61726176656c2d6576656e742d7265636f726465722e7376673f6c6162656c3d6c6174657374)](https://github.com/slavcodev/laravel-event-recorder)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![License](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Event recorder trait useful when an event should be emitted only after model successfully saved.

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

[](#installation)

Using [Composer](https://getcomposer.org)

```
composer require slavcodev/laravel-event-recorder
```

Usage
-----

[](#usage)

Just add the trait to any of you Eloquent model, it adds `recordEvent($event)` method and registers listener to emit all recorded events after save.

```
class User extends \Illuminate\Database\Eloquent\Model
{
    use \Slavcodev\Laravel\Events\EventRecorder;

    public function someModifications()
    {
        $this->recordEvent(new UserChanged());
    }
}
```

Testing
-------

[](#testing)

```
phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE OF CONDUCT](.github/CODE_OF_CONDUCT.md) for more details.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

770d ago

### Community

Maintainers

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

---

Top Contributors

[![slavcodev](https://avatars.githubusercontent.com/u/757721?v=4)](https://github.com/slavcodev "slavcodev (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slavcodev-laravel-event-recorder/health.svg)

```
[![Health](https://phpackages.com/badges/slavcodev-laravel-event-recorder/health.svg)](https://phpackages.com/packages/slavcodev-laravel-event-recorder)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[abbasudo/laravel-purity

elegant way to add filter and sort in laravel

514330.5k1](/packages/abbasudo-laravel-purity)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

240173.5k2](/packages/dragon-code-laravel-deploy-operations)[stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

2928.9k7](/packages/stayallive-laravel-eloquent-observable)

PHPackages © 2026

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