saeedpooyanfar/laravel-annotation
A Laravel package that brings PHP annotation support to your app, letting you define and read metadata via docblocks. It enables cleaner, declarative configuration for routes, validation, and other framework features without bulky config files.
routes/*.php and into PHP 8 attributes co-located with controllers. It is a workflow/velocity lever, not a customer-facing capability.Consider it when all of the following hold:
composer.json and accept owning a fork if the maintainer goes quiet.routes/*.php or to a better-adopted alternative.Look elsewhere when:
To executives: This is a small, free (MIT) developer-productivity package that lets engineers declare routes alongside controller code instead of in a separate file. The new v5.0.0 release adds Laravel 11 support, which removes the compatibility concern that previously made it hard to recommend. It is not a strategic platform choice and carries no license cost. Recommendation: approve a time-boxed trial in one non-critical internal service, not org-wide adoption. The downside stays contained — the code is small and MIT-licensed, so we can fork it internally if the maintainer stops shipping; the upside is modest reduction in route-file churn and faster onboarding. It should not appear on any customer-facing or revenue-critical path.
To engineering: The value proposition is co-location and less boilerplate; the cost is reflection-based indirection, weaker IDE/static-analysis support unless configured, and dependency risk (low adoption, but now demonstrably responsive to Laravel releases). v5.0.0 is a major version — treat any upgrade as a migration, not a patch: pin the version, read the diff, and confirm route and middleware coverage is byte-for-byte unchanged before merging. Proposed guardrails: wrap usage behind our own convention so it is replaceable, add a CI check that route coverage is unchanged, and set a review date. If the trial does not show a measurable drop in route-related merge conflicts or onboarding time, we revert to plain route files or evaluate the more widely adopted alternative.
How can I help you explore Laravel packages today?