0028-laravel-controllers
CommunityKeep controllers thin and behavior clean.
System Documentation
What problem does it solve?
It prevents bloated Laravel controllers by ensuring HTTP endpoints only orchestrate request/response flow while domain logic lives elsewhere.
Core Features & Use Cases
- Thin controller structure: Type-hint dependencies, rely on Form Requests for validation, call actions for behavior, and return resources/views with no business rules.
- Correct controller conventions: Use plural naming, RESTful method names only, and extract non-REST endpoints into invokable controllers.
- API list/query hygiene: Delegate filtering, sorting, and includes to Query Objects so controllers stay consistent and maintainable.
This fits teams building Web vs Public API layers, standard REST endpoints, and endpoints that need flexible API filtering without turning controllers into query-and-calculation dumping grounds.
Quick Start
Follow the guide to create or refactor your Laravel controllers so they validate via Form Requests, call Actions for domain logic, and return Resources or views while moving filtering and sorting into Query Objects.
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0028-laravel-controllers Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0028-laravel-controllers Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.