# Laravel:observer Pattern

> Implement reliable Laravel async workflows (queues/events/cache) with idempotency and failure handling. Use for observer pattern tasks.

- Skill: `btafoya/laravel-observer-pattern` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add btafoya/laravel-observer-pattern`
- Raw SKILL.md: https://api.skillmd.com/api/skills/btafoya/laravel-observer-pattern/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: btafoya (https://skillmd.com/u/btafoya)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/btafoya/laravel-observer-pattern

---


# Observer Pattern (Laravel)

## Use when
- Offloading heavy work to queues/events/cache workflows.
- Stabilizing retries, idempotency, and failure handling.

## Default workflow
1. Define async payload contract and idempotency strategy.
2. Implement handler/job with explicit retry/backoff behavior.
2. Configure observability and failure handling.
2. Verify dispatch + execution + failure paths with tests.

## Guardrails
- Do not pass oversized mutable payloads.
- Assume at-least-once delivery and code for safe retries.
- Instrument failures and dead-letter handling.

## Progressive disclosure
- Start with this file for execution posture and constraints.
- Load references only for deep implementation detail or edge cases.

## Output contract
- Async components changed and queue/cache strategy.
- Retry/backoff/failure decisions.
- Validation evidence for success and failure paths.

## References
- `reference.md`
- `docs/complexity-tiers.md`

