You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
387 B
PHTML

<?php
use FastRoute\RouteCollector;
use Psr\Http\Message\ServerRequestInterface;
/** @var RouteCollector $route */
/** Demo route endpoint, TODO: Remove */
$route->addRoute('GET', '/hello/{name}', function ($request) {
/** @var ServerRequestInterface $request */
$name = $request->getAttribute('name');
return response(sprintf('Hello %s!', htmlspecialchars($name)));
});