PHPackages                             leafs/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. [Framework](/categories/framework)
4. /
5. leafs/router

Abandoned → [leafs/leaf](/?search=leafs%2Fleaf)ArchivedLibrary[Framework](/categories/framework)

leafs/router
============

Leaf router module for Leaf PHP.

v0.4.0(1y ago)625.5k↓40.7%5[2 issues](https://github.com/leafsphp/router/issues)2MITPHP

Since Oct 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/leafsphp/router)[ Packagist](https://packagist.org/packages/leafs/router)[ Docs](https://leafphp.netlify.app/#/modules/router)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (21)Used By (2)

 [![](https://camo.githubusercontent.com/e83224618735d048f0f70f04e02d7973a634a055e18d47fe22501e3a85e40b9f/68747470733a2f2f6c6561667068702e6e65746c6966792e6170702f6173736574732f696d672f6c656166332d6c6f676f2e706e67)](https://camo.githubusercontent.com/e83224618735d048f0f70f04e02d7973a634a055e18d47fe22501e3a85e40b9f/68747470733a2f2f6c6561667068702e6e65746c6966792e6170702f6173736574732f696d672f6c656166332d6c6f676f2e706e67)

Leaf Router
===========

[](#leaf-router)

 [![Latest Stable Version](https://camo.githubusercontent.com/b047d7efe7adec3ee52026cbd0310289c5403465dec99d87b733eb2736a3766c/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f726f757465722f762f737461626c65)](https://packagist.org/packages/leafs/router) [![Total Downloads](https://camo.githubusercontent.com/086831fbc5a823d09811245e26fb62159009f3076bd51ed277efce55865afb01/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f726f757465722f646f776e6c6f616473)](https://packagist.org/packages/leafs/router) [![License](https://camo.githubusercontent.com/23fdb56db1ac5f608a4389b396cf6bd109cbf21cd79242ef7833b438019bbe91/68747470733a2f2f706f7365722e707567782e6f72672f6c656166732f726f757465722f6c6963656e7365)](https://packagist.org/packages/leafs/router)

Leaf router is the core routing engine which powers the Leaf PHP framework. Leaf router is now served as a serve-yourself module which can even be used outside the Leaf ecosystem.

**Leaf Router is still built into Leaf Core and doesn't need to be installed separately.**

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

[](#installation)

You can easily install Leaf using [Composer](https://getcomposer.org/).

```
composer require leafs/router
```

Basic Usage
-----------

[](#basic-usage)

If you are using leaf router with Leaf, you can build your leaf apps just as you've always done:

```
