grazulex/laravel-apiroute
Attribute-based API routing for Laravel: define endpoints directly on controllers, auto-register routes, and organize versioned APIs with middleware, resources, and validation support. Keeps route files clean, reduces boilerplate, and makes REST API code easier to maintain and scale.
Sunset and Deprecation headers) is the kind of detail that is easy to skip and expensive to retrofit. Adopting it early shapes how the product communicates breaking changes.Consider it when:
Look elsewhere when:
For executives: Our API is a product surface, and right now version changes are handled ad hoc. That creates integration risk with partners and customers, slows our ability to ship breaking improvements, and generates support load. This is a small, MIT-licensed Laravel package that formalizes the version lifecycle—introducing versions deliberately, signaling deprecation clearly, and retiring old versions on a schedule. The cost is low and the payoff is reduced integration incidents and a faster, safer path to ship API changes. The main caveat is maturity: it is a relatively young open-source project, so we should pilot it on a non-critical service before standardizing.
For engineering: This replaces hand-rolled version negotiation and deprecation middleware with a maintained, framework-native implementation. It means one convention for version resolution and standardized deprecation/sunset headers instead of per-service improvisation, which simplifies testing, documentation, and client SDK behavior. Adoption is incremental—it can be introduced service by service. Before committing, we should review the package's test coverage and release history, and confirm it fits our Laravel version and routing patterns; if it does not, we keep our current middleware and revisit.
How can I help you explore Laravel packages today?