no-framework-tutorial/implementation/07/config/routes.php

11 lines
285 B
PHP
Raw Normal View History

2022-05-19 21:39:08 +00:00
<?php declare(strict_types=1);
use FastRoute\RouteCollector;
use Lubian\NoFramework\Action\Hello;
use Lubian\NoFramework\Action\Other;
return function (RouteCollector $r) {
$r->addRoute('GET', '/hello[/{name}]', Hello::class);
$r->addRoute('GET', '/other', Other::class);
};