PHPackages                             lukman-ss/router - 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. lukman-ss/router

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

lukman-ss/router
================

A lightweight and flexible routing library for PHP 8.2+.

v1.0.1(yesterday)13↑2900%MITPHPPHP &gt;=8.2

Since Jun 13Pushed yesterdayCompare

[ Source](https://github.com/lukman-ss/router)[ Packagist](https://packagist.org/packages/lukman-ss/router)[ RSS](/packages/lukman-ss-router/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Lukman Router
=============

[](#lukman-router)

[![Lukman Router Hero](docs/hero.png)](docs/hero.png)

Lightweight routing package for PHP 8.2+ built on `lukman-ss/http`.

Features
--------

[](#features)

- HTTP route registration for `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS`, `HEAD`, `any()`, and `match()`.
- Static and dynamic route matching with `where()` constraints.
- Route groups with prefix, name prefix, and middleware.
- Handler dispatch for closures, array callables, and `Class@method`.
- Middleware pipeline using `Lukman\Http\MiddlewareInterface`.
- URL generation for named routes.

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

[](#installation)

```
composer require lukman-ss/router
```

Usage
-----

[](#usage)

```
