diff --git a/.docs/README.md b/.docs/README.md index 09111d5..d497ca0 100644 --- a/.docs/README.md +++ b/.docs/README.md @@ -105,10 +105,7 @@ If you don't want to create route with DELETE method, simply remove the `UsersPr ```php namespace App; -use Nette; -use Nette\Application\Routers\RouteList; -use Nette\Application\Routers\Route; -use Contributte\ApiRouter\ApiRoute; +use Contributte\ApiRouter\ApiRoute;use Nette;use Nette\Application\Routers\Route;use Nette\Application\Routers\RouteList; class RouterFactory { @@ -135,23 +132,28 @@ class RouterFactory * POST => UsersPresenter::actionCreate() */ $router[] = new ApiRoute('/hello', 'ApiRouter', [ - 'methods' => ['GET' => 'superRead', 'POST'] + 'methods' => ['GET' => 'superRead', 'POST'], ]); $router[] = new ApiRoute('/api-router/api/users[/]', 'Resources:Users', [ 'parameters' => [ - 'id' => ['requirement' => '\d+', 'default' => 10] + 'id' => ['requirement' => '\d+', 'default' => 10], ], - 'priority' => 1 + 'priority' => 1, ]); $router[] = new ApiRoute('/api-router/api/users/[/-]', 'Resources:Users', [ 'parameters' => [ - 'id' => ['requirement' => '\d+'] + 'id' => ['requirement' => '\d+'], ], - 'priority' => 1 + 'priority' => 1, ]); + # Disable basePath detection + $route = new ApiRoute('/api-router/api/users', 'Resources:Users'); + $route->setAutoBasePath(false); + $router[] = $route; + $router[] = new Route('/', 'Homepage:default'); return $router; diff --git a/README.md b/README.md index b5abe58..6ae991d 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,10 @@ For details on how to use this package, check out our [documentation](.docs). ## Versions -| State | Version | Branch | Nette | PHP | -|--------|----------|----------|--------|---------| -| dev | `^5.0.0` | `master` | `3.0+` | `>=8.0` | -| stable | `^4.3.0` | `master` | `3.0+` | `>=7.1` | +| State | Version | Branch | Nette | PHP | +|--------|---------|----------|--------|---------| +| dev | `^6.1` | `master` | `4.0+` | `>=8.1` | +| stable | `^6.0` | `master` | `3.1+` | `>=8.1` | ## Development diff --git a/composer.json b/composer.json index 9efdea6..4b3b3cd 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "6.1.x-dev" } } }