poshtive/router
Convention-based route discovery for Laravel controllers. Public methods become routes automatically, with PHP attributes for HTTP verb overrides, middleware, where constraints, prefixes, and model-bound parameters. Supports Laravel 12/13 and PHP 8.3.
convention (attribute_or_get vs prefix) and http_methods_map: choosing one is effectively choosing a team-wide naming contract for controllers and URLs. That is a people/process decision (onboarding cost, code review norms, merge-conflict frequency in routes/web.php) more than a technology decision.strict (fail on duplicate verb+URI or duplicate route names), report_skipped_routes, LocalOnly, and DoNotDiscover are governance features, not conveniences. They let a PM argue for "fail the build on route collisions" as a quality bar, which is a legitimate, low-cost win independent of this specific package.Adopt-worthy only if all of these hold:
laravel components: ^13.0. On Laravel 10/11/12 you cannot install it, so this is a blocker, not a friction point./user/{id}/show — parameter segments are interleaved before the method name, and /{id} sits inside the resource path. If you need /users/{user} and clean REST semantics, you will be writing #[Route(uri: ...)] attributes on most methods, which erases the benefit.qoqn/laravel-router) than the distributed name (poshtive/router) is a strong signal this is a personal or renamed project. Treat it as vendored code you maintain, not a dependency you receive updates from.php artisan route:cache, whether discovery runs per-request or once at boot, how generated route names look and whether route()/to_route() in Blade and tests keep working, and latency of directory scanning on a large app/Http/Controllers tree.Look elsewhere when any of these apply:
route:list, IDE route navigation, Ziggy, or generated OpenAPI to reason about endpoints. Invisible routes degrade all of these.routes/*.php is small. The problem this solves may not exist for you — verify the pain before buying the cure.To executives: This is a small, MIT-licensed developer-efficiency package that auto-generates Laravel routes from controller method names and PHP attributes. Its appeal is narrow and honest: less boilerplate and fewer merge conflicts when many engineers add endpoints to the same route file, plus built-in duplicate-route detection. It is not a platform bet. Signals are weak — zero stars, zero dependents, a single narrow version compatibility window (PHP 8.3 + Laravel 13), and no observable support commitment. Recommendation: fund a one-week, timeboxed spike inside an internal admin surface at most. Do not standardize on it, and do not let it touch any externally consumed API. Treat any adoption as "we own a fork," with the maintenance cost that implies. If the spike doesn't show a measurable reduction in route-file churn, stop — the default Laravel explicit-routes pattern is not the problem worth solving this quarter.
To engineering: The honest DX case is convention-based discovery via #[Route], #[Where], #[LocalOnly], #[DoNotDiscover], and #[IgnoreParentMiddleware], with two naming conventions and a http_methods_map shortcut for REST verbs. strict gives you fail-fast on duplicate verb+URI and duplicate names, which is genuinely useful. The costs are equally concrete: routes become invisible in code review; the default URL shape interleaves parameters before the action (/user/{id}/show), so keepOrder and explicit uri: overrides become routine; discovery must be validated against route:cache; and the child-controller convention hard-fails without an Eloquent parameter. Please answer those four questions in the spike write-up before we discuss adoption, and assume we are the maintainers.
How can I help you explore Laravel packages today?