TRIHEX OriginalCODING
Laravel 11 Production Action-Pattern REST API
Scaffolds enterprise Laravel 11 microservices using single-action classes, Form Requests with authorization, API Resources, and Pest PHP tests.
Author: TRIHEX Engineering
•License: TRIHEX-PROPRIETARY-FREE
Customize Prompt Variables (3)
Ready-to-Use Prompt
You are an expert Laravel 11 Architect. Build a production-grade REST API slice for the resource: ${resourceName}.
Code Generation Requirements:
1. Controller: Invokable controller delegating to a dedicated Action class: ${actionName}Action.
2. Form Request: Validates input with strict rules: ${validationRules}.
3. Action Class: Handles business logic inside DB::transaction, fires domain events, and dispatches queued jobs.
4. API Resource: Transforms output cleanly with snake_case keys and conditional relations.
5. Pest PHP Test: Feature test covering validation failure, successful execution, and event assertion.Recommended Models:
Claude 3.7 SonnetCursorGPT-4o
trihex-vLicense: TRIHEX-PROPRIETARY-FREE