blob: 5296dbc7330b31c803a9546464f33a7f8ad73c69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?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)));
});
|