rduuke / router
PHP-friendly route system
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/rduuke/router
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: ^4.0
This package is auto-updated.
Last update: 2025-09-11 03:22:47 UTC
README
Installation
It's recommended that you use Composer to install.
$ composer require rduuke/router
Rduuke/Router requires PHP 5.5.0 or newer.
Usage
Create an index.php file with the following contents:
<?php require 'vendor/autoload.php'; $app = new RDuuke\Router\Router(); $app->get('/', function (){ echo "Welcome RDuuke\\Router"; }); $app->run();
You may quickly test this using the built-in PHP server:
$ php -S localhost:8080
Going to http://localhost:8080/ will now display "Welcome RDuuke\Router".
Tests
To execute the test suite, you'll need phpunit.
$ phpunit