lorisleiva/request-controller
A Laravel package that lets Form Requests act as invokable controllers, combining validation, authorization, and request handling in a single class for cleaner single-action endpoints.
FormRequest, which is a concrete answer to "do we want fat controllers, action classes, or request objects?" Decide this once and apply it consistently.Consider it when:
Look elsewhere when:
For executives: This is a zero-cost, low-risk exploration, not a procurement. The package is a small MIT-licensed pattern that consolidates request validation and handling into one class in our Laravel stack. The upside is less boilerplate and faster delivery on simple endpoints; the downside is that it hasn't been maintained since 2020 and has negligible adoption, so we should not take it on as a production dependency. Recommendation: spend a short spike reading and, if useful, reimplementing the pattern in-house, then adopt it as an internal convention only if it measurably reduces code and review time. No budget, no vendor contract, no lock-in.
For engineering: The idea is sound and small: an invokable FormRequest that validates and then performs the action, eliminating a thin controller layer for single-action endpoints. It is easy to audit and trivial to reproduce internally, which removes the maintenance concern entirely. Two cautions: (1) compatibility is unverified against current Laravel/PHP — check before relying on the package itself; (2) the same author's action-class library is the more proven expression of this idea and is worth comparing before we standardize. Proposal: one engineer, one short spike, one documented internal convention, with a clear rule for when an endpoint outgrows the pattern and graduates to a controller or service class.
How can I help you explore Laravel packages today?