Installation
Requirements
- PHP 5.5 or higher
- Composer
Install via Composer
composer require php-compatible/router
Choose Your Routing Style
Each routing style has its own getting started guide with server configuration and examples.
| Approach | Best For | Style |
|---|---|---|
| File-Based Routing | Legacy projects with existing PHP files | file_router() in each file |
| Functional Routing | Full control, centralized routes | router(), route(), url_path() |
| Modern Routing | Clean syntax, new projects | Router::get(), Router::post() |