mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
Parameters are now correctly passed on to sub-routes
This commit is contained in:
@@ -655,6 +655,16 @@ SimpleRouter::group(['prefix' => '/admin'], function () {
|
||||
});
|
||||
```
|
||||
|
||||
You can also use parameters in your groups:
|
||||
|
||||
```php
|
||||
SimpleRouter::group(['prefix' => '/lang/{language}'], function ($language) {
|
||||
SimpleRouter::get('/users', function () {
|
||||
// Matches The "/admin/users" URL
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Partial groups
|
||||
|
||||
Partial router groups has the same benefits as a normal group, but supports parameters and are only rendered once the url has matched.
|
||||
|
||||
Reference in New Issue
Block a user