Skip to content

Commit 4e0cd36

Browse files
committed
fix routing documentation
1 parent d460564 commit 4e0cd36

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/framework/routing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,23 @@ use Psr\Container\ContainerInterface;
7878
/**
7979
* Setup routes with a single request method:
8080
*
81-
* $app->get('/', App\Handler\HomePageHandler::class, 'home');
82-
* $app->post('/album', App\Handler\AlbumCreateHandler::class, 'album.create');
83-
* $app->put('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.put');
84-
* $app->patch('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.patch');
85-
* $app->delete('/album/:id', App\Handler\AlbumDeleteHandler::class, 'album.delete');
81+
* $app->get('/', [App\Handler\HomePageHandler::class], 'home');
82+
* $app->post('/album', [App\Handler\AlbumCreateHandler::class], 'album.create');
83+
* $app->put('/album/:id', [App\Handler\AlbumUpdateHandler::class], 'album.put');
84+
* $app->patch('/album/:id', [App\Handler\AlbumUpdateHandler::class], 'album.patch');
85+
* $app->delete('/album/:id', [App\Handler\AlbumDeleteHandler::class], 'album.delete');
8686
*
8787
* Or with multiple request methods:
8888
*
89-
* $app->route('/contact', App\Handler\ContactHandler::class, ['GET', 'POST', ...], 'contact');
89+
* $app->route('/contact', [App\Handler\ContactHandler::class], ['GET', 'POST', ...], 'contact');
9090
*/
9191
return static function (Application $app, ContainerInterface $container) : void {
9292
$app->get('/', [SomeMiddleware::class, HomePageRequestHandler::class], 'home');
9393
};
9494

9595
````
9696

97-
The Request Handler must be an implementation of `Psr\RequestHandlerInterface`
97+
The Request Handler must be an implementation of `Psr\Http\Server\RequestHandlerInterface`
9898

9999
````php
100100
<?php

0 commit comments

Comments
 (0)