PHPackages                             artoodetoo/junc - 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. artoodetoo/junc

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

artoodetoo/junc
===============

Obvious map for FastRouter

v0.1.1(10y ago)259[1 issues](https://github.com/artoodetoo/junc/issues)MITPHPPHP &gt;=5.4.0

Since Feb 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/artoodetoo/junc)[ Packagist](https://packagist.org/packages/artoodetoo/junc)[ RSS](/packages/artoodetoo-junc/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Junc
====

[](#junc)

Junc is the concise way to define routes. Route map can be stored in any format, including JSON/YAML/.ini, only there was a way to convert it into an array.

It is not new routing library, but the addon to awesome [FastRouter](https://github.com/nikic/FastRoute/).

Install
-------

[](#install)

To install with composer:

```
composer require artoodetoo/junc
```

Usage
-----

[](#usage)

Since this package only enhances FastRoute behavior, look at FastRoute documentation. You have to realize how to use the route dispatcher. Then come back here to see the difference in route definition.

Junc replaces series of FastRoute's $r-&gt;addRoute() to one clear (static) roadmap.

### Example 1. Basic usage:

[](#example-1-basic-usage)

By default all the routes are for GET method.

```
