From eed128715f58ce0fe2ff4ea046558ba6a1ec156e Mon Sep 17 00:00:00 2001 From: BMTmohammedtaha Date: Sun, 20 Aug 2023 20:15:12 +0200 Subject: [PATCH] update README file --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc2132d..68a9871 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,11 @@ require_once 'vendor/autoload.php'; ```php use Effectra\Router\Route; +use Effectra\Router\RouteGroup; + use Effectra\Http\Foundation\RequestFoundation; use Effectra\Http\Message\Response; + use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; ``` @@ -63,13 +66,10 @@ $route->crud('/report', ReportController::class, 'read|readOne|create|delete|del $route->auth('/auth/', AuthController::class); -$route->group('/file/upload/', UploadController::class, [ - //['method|pattern' => 'method'] - ['post|pic' => 'pic'], - ['post|audio' => 'audio'], - ['post|video' => 'video'], - ['post|doc' => 'doc'], -]); +$route->group('/file/upload/', UploadController::class, function(RouteGroup $router){ + $router->post('audio','createAudio'); + $router->post('video','createVideo'); +}); ``` 5. Dispatch the incoming request: