PHPackages                             kdabrow/custom-events - 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. kdabrow/custom-events

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

kdabrow/custom-events
=====================

Custom events for the Eloquent

v1.0.0(9mo ago)05MITPHPPHP &gt;=8.2.0CI passing

Since Aug 16Pushed 9mo agoCompare

[ Source](https://github.com/karoldabro/custom-events)[ Packagist](https://packagist.org/packages/kdabrow/custom-events)[ RSS](/packages/kdabrow-custom-events/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Custom Events for Laravel Eloquent
==================================

[](#custom-events-for-laravel-eloquent)

Automatically dispatch Laravel events when your model's status field changes. Perfect for tracking workflow states, order processing, and any multi-step business processes.

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

[](#installation)

```
composer require kdabrow/custom-events
```

Features
--------

[](#features)

- 🚀 **Automatic Event Dispatching** - Events are fired when status changes
- 🎯 **BackedEnum Support** - Works only with PHP 8.1+ BackedEnums for type safety
- 🔧 **Configurable Field Names** - Customize which field triggers events
- 📝 **Convention-Based Naming** - Automatic event class name generation
- 🛡️ **Safe by Default** - Only dispatches events when classes exist
- ✅ **Laravel 10/11/12 Compatible** - Works with modern Laravel versions

Quick Start
-----------

[](#quick-start)

### 1. Create Your Status Enum

[](#1-create-your-status-enum)

```
