jobmetric/laravel-event-system

This is a event system management package for Laravel that you can use in your projects.

Installs: 108

Dependents: 10

Suggesters: 0

Security: 0

Stars: 7

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/jobmetric/laravel-event-system

2.8.0 2025-12-30 17:45 UTC

This package is auto-updated.

Last update: 2026-01-04 08:43:55 UTC


README

Contributors Forks Stargazers MIT License LinkedIn

Laravel Event System

Build Event-Driven Applications. Effortlessly.

Laravel Event System simplifies dynamic event management in Laravel applications. Stop managing events statically in service providers and start building flexible, maintainable event-driven architectures that adapt to your needs. It provides a flexible layer on top of Laravel's native event system, allowing you to register and manage events at runtime—perfect for modular applications, plugin-based systems, and event-driven architectures. This is where powerful event management meets developer-friendly simplicity—giving you complete control over your event system without the complexity.

Why Laravel Event System?

Dynamic Event Registration

Unlike traditional Laravel event systems that require static registration in service providers, Laravel Event System allows you to register and manage events dynamically at runtime. This means you can add, remove, or modify event listeners without code changes—perfect for modular applications and plugin systems.

Domain Event Architecture

The package provides a robust foundation for domain-driven design with its DomainEvent contract and EventRegistry. Create domain events with stable keys, rich metadata, and consistent structure across your application.

Runtime Flexibility

Enable or disable event listeners on the fly. Change priorities, update configurations, and manage your entire event system through a simple API or database-driven configuration. No deployment needed for event management changes.

Event Bus & Registry

Dispatch events by stable keys instead of hard-coding class names. The EventBus and EventRegistry provide a clean abstraction layer that decouples your code from concrete event classes, making your application more maintainable and testable.

What is Event System Management?

Event system management is the process of dynamically registering, configuring, and managing event-listener bindings in your application. Traditional Laravel applications require you to register events statically in service providers, but Laravel Event System takes a different approach:

  • Database-Driven: Event-listener bindings are stored in the database, making them manageable at runtime
  • Dynamic Registration: Add or remove event listeners without code changes
  • Priority Control: Control the execution order of listeners with priority values
  • Status Toggle: Enable or disable listeners without removing them
  • Domain Events: Use stable keys and rich metadata for domain events

Consider a plugin system that needs to register its own events. With Laravel Event System, you can register events with stable keys, dispatch them by key without hard-coding class names, build UI components that list available events with their metadata, enable or disable event handlers through an admin interface, and track event usage and analytics. The power of event system management lies not only in dynamic registration but also in making events easily manageable, configurable, and scalable throughout your application.

What Awaits You?

By adopting Laravel Event System, you will:

  • Build flexible plugin systems - Allow plugins to register their own events dynamically
  • Simplify event management - No more static event registration in service providers
  • Improve maintainability - Decouple your code from concrete event classes
  • Enable runtime configuration - Manage events through UI or API without deployments
  • Scale effortlessly - Handle complex event-driven architectures with ease
  • Maintain clean code - Simple, intuitive API that follows Laravel conventions

Quick Start

Install Laravel Event System via Composer:

composer require jobmetric/laravel-event-system

Documentation

Ready to transform your Laravel applications? Our comprehensive documentation is your gateway to mastering Laravel Event System:

📚 Read Full Documentation →

The documentation includes:

  • Getting Started - Quick introduction and installation guide
  • EventSystem Service - Complete API reference for managing events
  • DomainEvent - Implement domain events with stable keys and metadata
  • EventBus & EventRegistry - Dispatch events by keys and manage event registration
  • Requests & Resources - Validation and API response handling
  • Events - Hook into event system lifecycle
  • Real-World Examples - See how it works in practice

Contributing

Thank you for participating in laravel-event-system. A contribution guide can be found here.

License

The laravel-event-system is open-sourced software licensed under the MIT license. See License File for more information.