add chapter about data repositories, and start work on perfomance chapter
This commit is contained in:
parent
eb20213b94
commit
9a1f78947b
165 changed files with 14028 additions and 2028 deletions
15
implementation/16-data-repository/config/routes.php
Normal file
15
implementation/16-data-repository/config/routes.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use FastRoute\RouteCollector;
|
||||
use Lubian\NoFramework\Action\Hello;
|
||||
use Lubian\NoFramework\Action\Other;
|
||||
use Lubian\NoFramework\Action\Page;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
|
||||
return function (RouteCollector $r): void {
|
||||
$r->addRoute('GET', '/hello[/{name}]', Hello::class);
|
||||
$r->addRoute('GET', '/page', [Page::class, 'list']);
|
||||
$r->addRoute('GET', '/page/{page}', [Page::class, 'show']);
|
||||
$r->addRoute('GET', '/another-route', [Other::class, 'someFunctionName']);
|
||||
$r->addRoute('GET', '/', fn (Response $r) => $r->withStatus(302)->withHeader('Location', '/hello'));
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue