This skill provides standardized patterns for implementing Laravel API Resources to decouple database logic from the transport layer. It guides Claude in creating clean, cache-friendly response structures, managing complex pagination metadata, and utilizing conditional field loading to optimize API performance. By following these best practices, developers can ensure their API contracts remain stable while providing flexible data shapes for frontend consumers.
주요 기능
01Automated Eloquent Resource generation and implementation
02Best practices for API versioning and response shape stability
03Conditional field rendering using when() and mergeWhen() methods
04137 GitHub stars
05Smart relationship handling via whenLoaded() to prevent N+1 queries
06Standardized integration for Laravel's length-aware and cursor pagination
사용 사례
01Refactoring legacy controller-based response logic into decoupled Resources
02Optimizing mobile app endpoints by conditionally loading related data
03Building robust RESTful APIs with consistent JSON structures