0040-laravel-event-driven-architecture
CommunityBuild decoupled Laravel event workflows
Software Engineering#laravel#event-driven architecture#queued listeners#shouldqueueaftercommit#event subscribers#model observers
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It reduces tightly coupled application code by routing side effects (notifications, PDFs, indexing, auditing) through Laravel events and listeners instead of direct calls scattered across services.
Core Features & Use Cases
- Event + Listener Structure: Use typed event objects (data carriers) and single-responsibility listener classes to keep domain logic clean.
- Queued & Safer Dispatching: Run slow listeners asynchronously with
ShouldQueue, optionally conditionally withshouldQueue(), and protect data consistency withShouldQueueAfterCommitor$afterCommit = true. - Discovery, Subscribers, and Model Lifecycle Hooks: Rely on Laravel listener auto-discovery, use event subscribers for grouped handling, and dispatch events from model observers for lifecycle-driven workflows.
Quick Start
Ask an AI to generate a Laravel event, register an auto-discovered listener that sends a notification, and modify it to run queued after the database transaction commits.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0040-laravel-event-driven-architecture Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0040-laravel-event-driven-architecture Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.