PHPackages                             fostam/simplerouter - 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. fostam/simplerouter

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

fostam/simplerouter
===================

Simple router, mainly for API backends, with CORS support

v1.1.2(7y ago)11511MITPHPPHP &gt;=5.6

Since Jun 15Pushed 7y agoCompare

[ Source](https://github.com/fostam/php-simplerouter)[ Packagist](https://packagist.org/packages/fostam/simplerouter)[ RSS](/packages/fostam-simplerouter/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

fostam/simplerouter
===================

[](#fostamsimplerouter)

Simple PHP router, mainly for building API backends.

Features
--------

[](#features)

- Easy configuration
- Response and error handling
- Parameter input from URL, GET/POST parameters or JSON payload
- CORS support

Install
-------

[](#install)

The easiest way to install SimpleRouter is by using [composer](https://getcomposer.org/):

```
$> composer require fostam/simplerouter

```

Usage
-----

[](#usage)

This is how a typical "handler" would look like:

```
