executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
laravel-apiBuild REST endpoints with API Resources, Sanctum authentication, and versioned route groups in Laravel. Use when creating JsonResource classes, adding token-based auth, or defining rate-limited API routes.
Independent GitHub snapshot · Automated classification · Original documentation governs
php artisan make:resource UserResource.routes/api.php with version prefix and throttle middleware.auth:sanctum middleware to protected routes.See implementation examples for complete API Resource with collection usage.
ApiResource classes extending JsonResource for data transformation.UserResource::collection($users) for lists. Never use response()->json($model) or return raw models directly.toArray($request) to define specific output fields and prevent sensitive data leakage.php artisan make:resource UserResource to scaffold new resources.auth:sanctum middleware in routes/api.php for SPAs or mobile app authentication.HasApiTokens trait to your User model to enable token-based authentication.$user->createToken('token-name')->plainTextToken.Route::prefix('v1')->group(...) and use versioned namespaces (e.g., App\Http\Controllers\Api\V1).RateLimiter::for('api', ...) using Limit::perMinute(60) in AppServiceProvider.throttle:api middleware to route groups in routes/api.php.response()->json(): Use API Resource classes instead.When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:
ApiResource
routes/api.php
toArray()
Additional task-grounded exact anchors: UserResource