/fuse-laravel:laravel-apifrom fuse-laravel
Builds RESTful APIs with Laravel: API Resources for response transformation, Sanctum authentication, rate limiting, route versioning, Form Request validation, pagination, and HTTP client usage.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
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 |
/v1/, /v2/with() before pagination| Topic | Reference | When to consult |
|---|---|---|
| Routing | routing.md | Defining versioned API routes |
| Controllers | controllers.md | Controller patterns, resource methods |
| Middleware | middleware.md | Route protection, request filtering |
| Validation | validation.md | Form Requests, validation rules |
| Topic | Reference | When to consult |
|---|---|---|
| Requests | requests.md | Accessing input, files, headers |
| Responses | responses.md | API Resources, status codes |
| Pagination | pagination.md | Offset/cursor pagination |
| Topic | Reference | When to consult |
|---|---|---|
| Rate Limiting | rate-limiting.md | Throttle configuration |
| HTTP Client | http-client.md | Consuming external APIs |
| URLs | urls.md | URL generation, signed URLs |
| Strings | strings.md | String helpers, UUIDs, slugs |
| Redirects | redirects.md | Redirect responses |
| Template | Purpose |
|---|---|
| ApiController.php.md | Complete CRUD controller with service |
| api-routes.md | Versioned routes with middleware |
| routing-examples.md | Detailed routing patterns |
| Template | Purpose |
|---|---|
| FormRequest.php.md | Store/Update Form Requests |
| validation-rules.md | All validation rules reference |
| ApiResource.php.md | Resource with relationships |
| Template | Purpose |
|---|---|
| HttpClientService.php.md | Reusable HTTP client service |
return PostResource::collection($posts);
return PostResource::make($post);
return PostResource::make($post)->response()->setStatusCode(201);
return response()->json(null, 204);
public function store(StorePostRequest $request): JsonResponse
{
$post = $this->service->create($request->validated());
return PostResource::make($post)->response()->setStatusCode(201);
}
Route::middleware('throttle:60,1')->group(fn () => ...);
Route::prefix('v1')->group(function () {
Route::apiResource('posts', PostController::class);
});
return PostResource::collection(Post::paginate(15));
| Feature | Status | Reference |
|---|---|---|
| RESTful Controllers | ✅ | controllers.md |
| API Resources | ✅ | responses.md |
| Form Request Validation | ✅ | validation.md |
| Route Versioning | ✅ | routing.md |
| Route Model Binding | ✅ | routing.md |
| Middleware | ✅ | middleware.md |
| Rate Limiting | ✅ | rate-limiting.md |
| Pagination | ✅ | pagination.md |
| Cursor Pagination | ✅ | pagination.md |
| HTTP Client | ✅ | http-client.md |
| Signed URLs | ✅ | urls.md |
| JSON Responses | ✅ | responses.md |
Laravel 13 introduces #[Collects] and #[PreserveKeys] to configure ResourceCollections via PHP attributes.
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Http\Resources\Attributes\Collects;
use Illuminate\Http\Resources\Attributes\PreserveKeys;
#[Collects(PostResource::class)]
#[PreserveKeys]
final class PostCollection extends ResourceCollection {}
For JSON:API APIs (sparse fieldsets, includes, links), see [[laravel-jsonapi]], which covers ?include=, ?fields[type]=, and spec-compliant pagination.
JsonResource) for every public JSON response/api/v1) rather than via header (readable, cacheable)throttle:60,1 + custom limiter)cursor() pagination for large lists (stable, performant)PreventRequestForgery exemption for external webhooksreferences/controllers.md (opens in a new tab)references/http-client.md (opens in a new tab)references/middleware.md (opens in a new tab)references/pagination.md (opens in a new tab)references/rate-limiting.md (opens in a new tab)references/redirects.md (opens in a new tab)references/requests.md (opens in a new tab)references/responses.md (opens in a new tab)references/routing.md (opens in a new tab)references/strings.md (opens in a new tab)references/templates/ApiController.php.md (opens in a new tab)references/templates/ApiResource.php.md (opens in a new tab)references/templates/FormRequest.php.md (opens in a new tab)references/templates/HttpClientService.php.md (opens in a new tab)references/templates/api-routes.md (opens in a new tab)references/templates/routing-examples.md (opens in a new tab)references/templates/validation-rules.md (opens in a new tab)references/urls.md (opens in a new tab)references/validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
laravel-api, api-resources, sanctum, rate-limiting, api-versioning
23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-architectureUse when structuring a Laravel project, creating services/repositories/actions, implementing dependency injection, or organizing code layers.npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravelOther plugins' skills for the same job