PHPackages                             robert430404/rc-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. robert430404/rc-router

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

robert430404/rc-router
======================

This is a simple router with regex parsing

2.1.0(9y ago)718MITPHPPHP &gt;=7.0

Since Feb 18Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Robert430404/rc-router)[ Packagist](https://packagist.org/packages/robert430404/rc-router)[ RSS](/packages/robert430404-rc-router/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/c02b767125337eece83be7e90dd11c7cde6fede09c2fb160ecb14eeedd6d8a46/68747470733a2f2f706f7365722e707567782e6f72672f726f626572743433303430342f72632d726f757465722f762f737461626c65)](https://packagist.org/packages/robert430404/rc-router)[![Build Status](https://camo.githubusercontent.com/050cc188264514a74b81cd11fb4661371fcd41eba697faff61b13415d2dfa4b4/68747470733a2f2f7472617669732d63692e6f72672f526f626572743433303430342f72632d726f757465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Robert430404/rc-router)[![codecov](https://camo.githubusercontent.com/83618ec9c74f318c21911be6ea9a74b8f846c178c17a9a8d1ac21dd0dc99f062/68747470733a2f2f636f6465636f762e696f2f67682f526f626572743433303430342f72632d726f757465722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Robert430404/rc-router)

### What Is This?

[](#what-is-this)

This is RC Router. This is a simple regex based router that allows you to pass variables by using place holders in your route.

### Why Write This?

[](#why-write-this)

I did it to flex my brain, and get a full understanding of how routing works in the PHP space. Rather than just reading about it and assuming I knew what did what, I wrote this to solidify my knowledge.

### Installing The Package

[](#installing-the-package)

Simply use composer:

```
composer require robert430404/rc-router

```

### How Does It Work?

[](#how-does-it-work)

This is a composer package so it relies on composer for the autoloading of the classes. You then create a new instance of the Router() object and start assigning your routes to the instance. Once you have your routes defined, you then pass the Router() into the Resolver() and it handles your routes.

```
