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

ActiveLibrary

hichemkhial/php-router
======================

A simple vanilla php router

03[1 PRs](https://github.com/gitflash/vanillaPhpRouter/pulls)PHP

Since Sep 27Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

vanillaPhpRouter
================

[](#vanillaphprouter)

a simple vanilla php router

How to use
----------

[](#how-to-use)

the router is a composer ready library.

1. Copy php-router/ to the root project directoy
2. run `composer require "hichemkhial/php-router":"@dev"`
3. run `composer dumpautoload -o`
4. the project folder structure needs to be the following

    ```
    [APP_NAME]/controller
              /config/routes.php
              /index.php
    ```

    ​

to instanciate the router you just need to create an instance of it on the index.php file

```
