|
10 | 10 | /** |
11 | 11 | * Setup routes with a single request method: |
12 | 12 | * |
13 | | - * $app->get('/', App\Handler\HomePageHandler::class, 'home'); |
14 | | - * $app->post('/album', App\Handler\AlbumCreateHandler::class, 'album.create'); |
15 | | - * $app->put('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.put'); |
16 | | - * $app->patch('/album/:id', App\Handler\AlbumUpdateHandler::class, 'album.patch'); |
17 | | - * $app->delete('/album/:id', App\Handler\AlbumDeleteHandler::class, 'album.delete'); |
18 | | - * |
19 | | - * Or with multiple request methods: |
20 | | - * |
21 | | - * $app->route('/contact', App\Handler\ContactHandler::class, ['GET', 'POST', ...], 'contact'); |
| 13 | + * $app->get('/', [App\Handler\HomePageHandler::class], 'home'); |
| 14 | + * $app->post('/album', [App\Handler\AlbumCreateHandler::class], 'album.create'); |
| 15 | + * $app->put('/album/:id', [App\Handler\AlbumUpdateHandler::class], 'album.put'); |
| 16 | + * $app->patch('/album/:id', [App\Handler\AlbumUpdateHandler::class], 'album.patch'); |
| 17 | + * $app->delete('/album/:id', [App\Handler\AlbumDeleteHandler::class], 'album.delete'); |
22 | 18 | */ |
23 | 19 | return static function (Application $app, ContainerInterface $container) : void { |
24 | 20 | $app->get('/', [HelloWorld::class, HomePage::class], 'home'); |
|
0 commit comments