diff --git a/README.md b/README.md index b2825e5..2def28e 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ Supported features: * **v4.x.x (LTS)** * v3.x.x (Unsupported) - -The versions *v2* and *v1* are not available in this repository, please consider an upgrade to the newer versions if you are still using them. +* v2.x.x (Unavailable) +* v1.x.x (Unavailable) ## Installation @@ -70,7 +70,6 @@ After the configurations mentioned above, you can start using PhpRouter in your ```php use MiladRahimi\PhpRouter\Router; -use Zend\Diactoros\Response\JsonResponse; $router = new Router(); @@ -78,18 +77,10 @@ $router->get('/', function () { return '

This is homepage!

'; }); -$router->post('/blog/post/{id}', function ($id) { - return HtmlResponse("

This is a post $id

"); -}); - -$router->patch('/json', function () { - return new JsonResponse(["message" => "posted data to user: $id"]); -}); - $router->dispatch(); ``` -There are more examples [here](https://github.com/miladrahimi/phprouter/blob/master/examples/index.php). +There are more examples [here](https://github.com/miladrahimi/phprouter/tree/master/examples). ## HTTP Methods diff --git a/composer.json b/composer.json index faf9bc7..da5ad13 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "miladrahimi/phprouter", - "description": "PhpRouter is a powerful and standalone HTTP URL router for PHP projects.", + "description": "PhpRouter is a powerful, standalone, and very fast HTTP URL router for PHP projects.", "keywords": [ "Router", "URL Router", diff --git a/examples/example-01/index.php b/examples/example-01/index.php index 3143c94..90a6f87 100644 --- a/examples/example-01/index.php +++ b/examples/example-01/index.php @@ -3,7 +3,6 @@ require('../../vendor/autoload.php'); use MiladRahimi\PhpRouter\Router; -use Zend\Diactoros\Response\JsonResponse; $router = new Router(); @@ -11,8 +10,4 @@ return '

This is homepage!

'; }); -$router->post('/api/user/{id}', function ($id) { - return new JsonResponse(["message" => "posted data to user: $id"]); -}); - $router->dispatch();