PHPackages                             horizom/routing - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. horizom/routing

ActiveLibrary[HTTP &amp; Networking](/categories/http)

horizom/routing
===============

The Horizom Routing package.

5.2.1(2mo ago)02392MITPHPPHP ^8.0

Since Jul 10Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/horizom/routing)[ Packagist](https://packagist.org/packages/horizom/routing)[ Docs](https://horizom.github.io/routing)[ RSS](/packages/horizom-routing/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (15)Versions (7)Used By (2)

Horizom Routing
===============

[](#horizom-routing)

[![Total Downloads](https://camo.githubusercontent.com/adf0f178c7fad8779aef3672aac49ac575126cb5454c661c32b8ccbc69156744/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f726f7574696e672f642f746f74616c2e737667)](https://packagist.org/packages/horizom/routing)[![Latest Stable Version](https://camo.githubusercontent.com/277409657b243442b676f514ef25a871fb6d30c3d78575de3b61e83d7aaa98f7/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f726f7574696e672f762f737461626c652e737667)](https://packagist.org/packages/horizom/routing)[![License](https://camo.githubusercontent.com/35bb49ecb4ef5cfd99525f0920ba5af2fe421c454fcaddd8c169135eeee34dc9/68747470733a2f2f706f7365722e707567782e6f72672f686f72697a6f6d2f726f7574696e672f6c6963656e73652e737667)](https://packagist.org/packages/horizom/routing)

Lightweight PSR-friendly routing for Horizom applications, built on top of FastRoute.

The package provides:

- HTTP route registration for all common verbs
- Group prefixes, middleware and attributes
- Resource-style route generation
- Redirect and permanent redirect helpers
- PSR-11 container based handler resolution
- Lazy handler resolution for lower bootstrap cost
- PSR-15 compatible request dispatching

Requirements
------------

[](#requirements)

- PHP 8.0+
- A PSR-11 container

Installation
------------

[](#installation)

```
composer require horizom/routing
```

Quick Start
-----------

[](#quick-start)

Use `RouterFactory` when you want eager handler resolution, or `RouterLazyFactory` when handlers should be resolved only when a route is matched.

```
