88
99PhpRouter is a powerful, standalone, and very fast HTTP URL router for PHP projects.
1010
11- Supported features:
12- * Multiple controller types (class, closure, and function)
11+ Some of supported features:
1312* Route parameters
14- * Predefined route parameter regex patterns
1513* Middleware
1614* Route groups (URI prefix, namespace prefix, middleware, and domain)
1715* Route names
16+ * PSR-7 requests and responses
17+ * Multiple controller types (class, closure, and function)
18+ * Predefined route parameter regex patterns
1819* Multiple domains or subdomains (regex pattern)
1920* Custom HTTP methods
20- * PSR-7 requests and responses
2121* Request, response and router instance injection
2222
23- It requires PHP ` v7.1 ` or newer versions.
23+ Current version requires PHP ` v7.1 ` or newer versions.
2424
2525## Versions
2626
@@ -68,7 +68,7 @@ First of all, you need to configure your webserver to handle all the HTTP reques
6868
6969## Getting Started
7070
71- After the configurations mentioned above, you can start using PhpRouter in your entry point file (`index.php`) like this example:
71+ After applying the configurations mentioned above, you can start using PhpRouter in your entry point file (`index.php`) like this example:
7272
7373```php
7474use MiladRahimi\PhpRouter\Router;
@@ -82,7 +82,21 @@ $router->get('/', function () {
8282$router->dispatch();
8383```
8484
85- There are more examples [ here] ( https://github.com/miladrahimi/phprouter/tree/master/examples ) .
85+ Chaining methods is also possible, take a look at this example:
86+
87+ ``` php
88+ use MiladRahimi\PhpRouter\Router;
89+
90+ $router = new Router();
91+
92+ $router
93+ ->get('/', function () {
94+ return '<p >This is homepage!</p >';
95+ })
96+ ->dispatch();
97+ ```
98+
99+ There are more examples available [ here] ( https://github.com/miladrahimi/phprouter/tree/master/examples ) .
86100
87101## HTTP Methods
88102
0 commit comments