scaffold-listener
3
总安装量
3
周安装量
#58495
全站排名
安装命令
npx skills add https://github.com/iurygdeoliveira/labsis-kit --skill scaffold-listener
Agent 安装分布
claude-code
2
windsurf
1
trae
1
opencode
1
codex
1
antigravity
1
Skill 文档
Laravel Listener Pattern Skill
Use this skill when implementing Event-Driven Architecture.
Workflow
- Create Event:
php artisan make:event [EventName] - 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.