scaffold-listener

SKILL.md

Laravel Listener Pattern Skill

Use this skill when implementing Event-Driven Architecture.

Workflow

  1. Create Event: php artisan make:event [EventName]
  2. Create Listener: php artisan make:listener [ListenerName] --event=[EventName]

Rules

1. Queued Listeners

  • If the listener performs IO (Email, API, Notification), it MUST implement ShouldQueue.
class SendWelcomeEmail implements ShouldQueue
{
    // ...
}

2. Dependency Injection

  • Inject dependencies in __construct.
  • Access event data in handle(EventName $event).

3. Verification

  • Ensure the mapping exists. Laravel 11/12 detects it automatically if the listener type-hints the event.
Weekly Installs
3
GitHub Stars
31
First Seen
Jan 24, 2026
Installed on
claude-code2
windsurf1
trae1
opencode1
codex1
antigravity1