Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Router Laravel Package

rareloop/router

Rareloop Router is a lightweight, fast PHP router built around PSR-7 and PSR-15. It supports route parameters, groups, middleware, named routes and route caching, making it easy to add clean, expressive routing to any PHP application without a full framework.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for the routing layer. If we're assembling a service on PSR-7 primitives (Slim, Mezzio, a custom kernel) rather than adopting a full framework, this is a candidate to buy instead of hand-rolling. Routing is commodity logic with sharp edges (trailing slashes, optional segments, param regex, method spoofing) — writing it ourselves is pure cost.
  • Framework exit / de-frameworking roadmap. The Laravel-shaped API is the headline. It lets us peel services out of a monolith or move to a lighter runtime without retraining the team on route syntax — a real, measurable reduction in migration cost and onboarding time.
  • Standardizing routing across heterogeneous services. If we run several small PHP services with inconsistent routing conventions, adopting one PSR-7 router (with PSR-15 middleware interop) is a cheap consistency win and simplifies shared observability, auth middleware, and API versioning via groups/prefixes.
  • Scope decisions for new services. Supports the call "this doesn't need a framework." A router + PSR-15 middleware stack + a DI container covers most internal APIs and integration services at a fraction of the footprint and audit surface.
  • Hiring and ramp assumptions. Laravel familiarity is the most abundant PHP skill in the market. A Laravel-idiomatic API on a non-Laravel stack widens the candidate pool for these services.

When to Consider This Package

Adopt when all of these hold:

  • We are already committed to PSR-7/PSR-15 (or are willing to be) and do not want a full framework's opinions.
  • The team's mental model is Laravel routing; API familiarity has direct productivity value.
  • The routing needs are conventional — groups, prefixes, named routes, route parameters, middleware attachment. Verify these against the docs before committing; "inspired by the Laravel API" is not the same as parity.
  • We want MIT-licensed, small-surface-area code we can read and, if necessary, fork.

Look elsewhere when:

  • Throughput is the binding constraint. If we are near the limits of PHP request routing, benchmark against FastRoute directly — it is the de facto standard and likely already in the dependency tree of whatever we'd otherwise use.
  • We need ecosystem depth. 87 stars means thin Stack Overflow coverage, few third-party integrations, and near-zero chance of an unrelated contributor fixing our bug. For a long-lived critical path, weigh against the Symfony Routing component, which is battle-tested and vendor-backed.
  • We want batteries included. If we need templating, ORM, queues, auth scaffolding — pick Laravel or Symfony. A router is not a framework strategy.
  • Single-maintainer risk is unacceptable for the specific service. Mitigate by wrapping the router behind our own thin interface and keeping FastRoute/Slim as a documented fallback.

How to Pitch It (Stakeholders)

To executives: This is a low-cost, MIT-licensed component that lets us keep Laravel-style developer ergonomics while moving off the Laravel framework where a full framework is overkill. The business case is migration and onboarding cost, not license savings — it reduces retraining during de-frameworking and shrinks the operational and security surface of small services. Risk is contained because the router is a thin, replaceable layer, not a platform bet.

To engineering: PSR-7/PSR-15 native, Laravel-idiomatic syntax, small enough to read end to end, MIT so we can patch or fork. We isolate it behind our own routing abstraction so the exit cost to FastRoute or Symfony Routing is a day, not a quarter.

The honest caveat, stated up front: this is a modest-adoption package with concentrated maintainership. That's acceptable for a swappable infrastructure component and not acceptable for a strategic dependency. Frame the decision that way and it survives scrutiny.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core