PHPackages                             envant/fireable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. envant/fireable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

envant/fireable
===============

An elegant way to trigger events based on attributes changes

v1.0.11(3y ago)445793.9k↓17.3%26[1 issues](https://github.com/envant/fireable/issues)[2 PRs](https://github.com/envant/fireable/pulls)3MITPHPPHP ^7.2|^8

Since Sep 19Pushed 2y ago8 watchersCompare

[ Source](https://github.com/envant/fireable)[ Packagist](https://packagist.org/packages/envant/fireable)[ Docs](https://github.com/envant/fireable)[ RSS](/packages/envant-fireable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (13)Used By (3)

Fireable
========

[](#fireable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/704f170ed9856ba859fee17e8c5bdc4eafd07602aa74024a6606c7fa416f5819/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e76616e742f6669726561626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/envant/fireable)[![StyleCI](https://camo.githubusercontent.com/f182ac83d4bc2eeb42d3beb30a27f20ec8ec5ad525b90dcf6748306c94c797ce/68747470733a2f2f7374796c6563692e696f2f7265706f732f3230393430373330302f736869656c64)](https://styleci.io/repos/209407300)[![Build Status](https://camo.githubusercontent.com/c151da1569fe3cfe07de1a2b29a6e694e31a331db31b81b265b7cec89240db48/68747470733a2f2f7472617669732d63692e6f72672f656e76616e742f6669726561626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/envant/fireable)[![Total Downloads](https://camo.githubusercontent.com/83860a858ed9fd9ac1fa7b9a7b96fb2e965685bc602dfafa4702f86e26a1f4b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e76616e742f6669726561626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/envant/fireable)

An elegant way to trigger events based on attributes changes.

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

[](#installation)

Install package through Composer

```
$ composer require envant/fireable
```

Usage
-----

[](#usage)

1. Add the `FireableAttributes` trait to your model
2. Define the attributes with specified events via the `protected $fireableAttributes` property on the model

### Example

[](#example)

Let's say we need to trigger specified events when specific model attributes are updated.

For example, you need to notify user when he gets an "approved" status. Instead of observing model's "dirty" attributes and firing events manually we could do it more elegantly by assigning specified events to attributes or even certain values of attributes.

```
class User extends Authenticatable
{
    use FireableAttributes;

    protected $fireableAttributes = [
        'status' => [
            'approved' => UserApproved::class,
            'rejected' => UserRejected::class,
        ],
    ];
}
```

Also you may not need to track certain values, so you can assign an event directly to an attribute itself. So, in the example below, each time the user's email is changed, the appropriate event will be fired.

```
class User extends Authenticatable
{
    use FireableAttributes;

    protected $fireableAttributes = [
        'email' => EmailUpdated::class,
    ];
}
```

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

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Boris Lepikhin](https://github.com/envant)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity56

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 62% 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 ~115 days

Recently: every ~275 days

Total

12

Last Release

1167d ago

PHP version history (3 changes)v1.0.4PHP ^7.1.3

v1.0.5PHP ^7.2

1.0.9PHP ^7.2|^8

### Community

Maintainers

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

---

Top Contributors

[![lepikhinb](https://avatars.githubusercontent.com/u/17538801?v=4)](https://github.com/lepikhinb "lepikhinb (31 commits)")[![joaorobertopb](https://avatars.githubusercontent.com/u/6556083?v=4)](https://github.com/joaorobertopb "joaorobertopb (5 commits)")[![Davidnadejdin](https://avatars.githubusercontent.com/u/40993387?v=4)](https://github.com/Davidnadejdin "Davidnadejdin (5 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (2 commits)")[![hesham-fouda](https://avatars.githubusercontent.com/u/15731469?v=4)](https://github.com/hesham-fouda "hesham-fouda (2 commits)")[![ilzrv](https://avatars.githubusercontent.com/u/28765966?v=4)](https://github.com/ilzrv "ilzrv (2 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

eventlaravelFireable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/envant-fireable/health.svg)

```
[![Health](https://phpackages.com/badges/envant-fireable/health.svg)](https://phpackages.com/packages/envant-fireable)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[sebdesign/laravel-state-machine

Winzou State Machine service provider for Laravel

3401.3M1](/packages/sebdesign-laravel-state-machine)[glhd/special

1929.4k](/packages/glhd-special)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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