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

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

rgehan/router
=============

A really simple dependency-free PHP router

1.0.4(9y ago)214MITPHP

Since Apr 18Pushed 9y agoCompare

[ Source](https://github.com/rgehan/router-php)[ Packagist](https://packagist.org/packages/rgehan/router)[ RSS](/packages/rgehan-router/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)DependenciesVersions (6)Used By (0)

[rgehan/router-php](https://github.com/rgehan/router-php)
---------------------------------------------------------

[](#rgehanrouter-php)

This is a really simple router, it has no external dependency. It allows you to define routes, for specific verbs, and map them to a method in a controller class.

I loosely imitates Laravel router.

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

[](#installation)

Simple require it with Composer

```
composer require rgehan/router

```

Usage
-----

[](#usage)

This code should reside in a PHP file where all requests are redirected to (with an `.htaccess` file for example).

```
