tillklockmann/route66

v1.0.1 2020-09-21 19:51 UTC

This package is auto-updated.

Last update: 2025-06-22 06:36:02 UTC


README

A simple router.

install with composer

composer require tillklockmann\route66:v1.0.0

usage

In order to make the app work, you need to have a Repository and a Controller class, that extend the Route66 abstract counterpart.

require 'vendor/autoload.php';

use Route66\Router;

$container = new Container;

$container['controller'] = function($c) {
    return new MyOwnController;
}

$app = new Router($container);

$app->get('/', 'controller@index');
$app->get('/about', 'controller@about');

$app->run();

Have fun :-)