What problem does it solve?
This Skill streamlines the process of creating new API endpoints, ensuring compliance with project standards and best practices.
Core Features & Use Cases
- Compliant Endpoint Creation: Guides the user through creating new API routes, controllers, form requests, resources, and tests in a standardized manner.
- Directory Layout: Provides a structured directory layout with examples for controllers, requests, resources, routes, and tests.
- Form Request: Offers guidance on creating form requests with authorization, typed accessor methods, and validation rules.
- Controller: Details how to create controllers with injected services and route model binding.
- Route Registration: Explains how to register routes with prefix grouping and middleware considerations.
- Resources: Outlines the creation of single and collection resources for API responses.
- PHPUnit Test: Guides on writing tests for public and authenticated endpoints, including mocking service dependencies.
- Checklist: Provides a step-by-step checklist for after writing files, including running tests, formatting, and staging changes.
Quick Start
Create a new API endpoint by following the directory layout guide and use the provided examples to write a controller, request, resource, and route.