What problem does it solve?
This Skill provides a comprehensive guide and best practices for building secure, efficient, and well-structured REST APIs using the Laravel framework, reducing common errors and improving maintainability.
Core Features & Use Cases
- API Controller Standards: Enforces separation and naming conventions for API controllers.
- API Resource Transformation: Guides the use of API Resources for consistent JSON output.
- Routing Conventions: Defines best practices for API versioning, authentication grouping, and resource routing.
- Response Formatting: Ensures consistent JSON structures and appropriate HTTP status codes.
- Authentication: Demonstrates secure API authentication using Sanctum.
- Filtering & Sorting: Implements patterns for efficient data filtering and sorting.
- Rate Limiting: Configures API rate limiting to prevent abuse.
- Error Handling: Establishes robust API error handling mechanisms.
- Use Case: When developing a new feature that requires an API endpoint, use this Skill to ensure the endpoint adheres to all Laravel API best practices from the start.
Quick Start
Use the laravel-api skill to generate a standard API controller for managing 'Order' resources.