← ClaudeAtlas

laravel-apilisted

Build RESTful APIs with Laravel using API Resources, Sanctum authentication, rate limiting, and versioning. Use when creating API endpoints, transforming responses, or handling API authentication.
fusengine/agents · ★ 15 · API & Backend · score 84
Install: claude install-skill fusengine/agents
# Laravel API Development ## Agent Workflow (MANDATORY) Before ANY implementation, use `TeamCreate` to spawn 3 agents: 1. **fuse-ai-pilot:explore-codebase** - Analyze existing API patterns 2. **fuse-ai-pilot:research-expert** - Verify Laravel API docs via Context7 3. **mcp__context7__query-docs** - Check API Resources and Sanctum patterns After implementation, run **fuse-ai-pilot:sniper** for validation. --- ## Overview Build RESTful APIs with Laravel using API Resources for response transformation and Sanctum for authentication. | Component | Purpose | |-----------|---------| | **Controllers** | Handle requests, delegate to services | | **Form Requests** | Validate input, authorize actions | | **API Resources** | Transform models to JSON | | **Middleware** | Auth, rate limiting, CORS | | **Routes** | Versioned endpoints with groups | | **Pagination** | Offset/cursor pagination | | **HTTP Client** | Consume external APIs | --- ## Critical Rules 1. **Always use API Resources** - Never return Eloquent models directly 2. **Versioned routes** - Prefix with `/v1/`, `/v2/` 3. **Validate all input** - Use Form Requests, not inline validation 4. **Rate limiting** - Configure per-route limits 5. **Consistent responses** - Same structure, proper status codes 6. **Use services** - Keep controllers thin 7. **Eager load** - Prevent N+1 with `with()` before pagination --- ## Reference Guide ### Core Concepts | Topic | Reference | When to consult | |-------|-----------|------