Skip to content

Commit bc6d94d

Browse files
committed
mirror updates
1 parent 8e29d7c commit bc6d94d

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Supported features:
2424

2525
* **v4.x.x (LTS)**
2626
* v3.x.x (Unsupported)
27-
28-
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.
27+
* v2.x.x (Unavailable)
28+
* v1.x.x (Unavailable)
2929

3030
## Installation
3131

@@ -70,26 +70,17 @@ After the configurations mentioned above, you can start using PhpRouter in your
7070
7171
```php
7272
use MiladRahimi\PhpRouter\Router;
73-
use Zend\Diactoros\Response\JsonResponse;
7473
7574
$router = new Router();
7675
7776
$router->get('/', function () {
7877
return '<p>This is homepage!</p>';
7978
});
8079
81-
$router->post('/blog/post/{id}', function ($id) {
82-
return HtmlResponse("<p>This is a post $id</p>");
83-
});
84-
85-
$router->patch('/json', function () {
86-
return new JsonResponse(["message" => "posted data to user: $id"]);
87-
});
88-
8980
$router->dispatch();
9081
```
9182

92-
There are more examples [here](https://github.com/miladrahimi/phprouter/blob/master/examples/index.php).
83+
There are more examples [here](https://github.com/miladrahimi/phprouter/tree/master/examples).
9384

9485
## HTTP Methods
9586

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "miladrahimi/phprouter",
3-
"description": "PhpRouter is a powerful and standalone HTTP URL router for PHP projects.",
3+
"description": "PhpRouter is a powerful, standalone, and very fast HTTP URL router for PHP projects.",
44
"keywords": [
55
"Router",
66
"URL Router",

examples/example-01/index.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@
33
require('../../vendor/autoload.php');
44

55
use MiladRahimi\PhpRouter\Router;
6-
use Zend\Diactoros\Response\JsonResponse;
76

87
$router = new Router();
98

109
$router->get('/', function () {
1110
return '<p>This is homepage!</p>';
1211
});
1312

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

0 commit comments

Comments
 (0)