PHPackages                             julienlinard/php-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. julienlinard/php-router

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

julienlinard/php-router
=======================

Un routeur PHP moderne et complet avec support des routes dynamiques, middlewares, groupes de routes et génération d'URL. Compatible PHP 8+ avec Attributes.

1.4.4(4mo ago)132222MITPHPPHP &gt;=8.0

Since Dec 16Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/julien-lin/php-router)[ Packagist](https://packagist.org/packages/julienlinard/php-router)[ Docs](https://github.com/julien-lin/php-router)[ RSS](/packages/julienlinard-php-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (10)Used By (2)

PHP Router
==========

[](#php-router)

[🇫🇷 Read in French](README.fr.md) | [🇬🇧 Read in English](README.md)

💝 Support the project
---------------------

[](#-support-the-project)

If this bundle is useful to you, consider [becoming a sponsor](https://github.com/sponsors/julien-lin) to support the development and maintenance of this open source project.

---

A modern and complete PHP router for managing your application routes with support for dynamic routes, middlewares, and all essential features.

📋 Table of Contents
-------------------

[](#-table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Route Definition](#route-definition)
- [Dynamic Routes](#dynamic-routes)
- [Route Groups](#route-groups)
- [URL Generation](#url-generation)
- [Request](#request)
- [Response](#response)
- [Middlewares](#middlewares)
- [Error Handling](#error-handling)
- [API Reference](#api-reference)
- [Complete Examples](#complete-examples)

🚀 Installation
--------------

[](#-installation)

Use Composer to install the package:

```
composer require julienlinard/php-router
```

**Requirements**: PHP 8.0 or higher

⚡ Quick Start
-------------

[](#-quick-start)

```
