You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/guides/routing.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ declare(strict_types=1);
14
14
15
15
namespace App\Blog\Controller;
16
16
17
-
use Marko\Routing\Attribute\Get;
18
-
use Marko\Routing\Attribute\Post;
19
-
use Marko\Routing\Attribute\Delete;
17
+
use Marko\Routing\Attributes\Get;
18
+
use Marko\Routing\Attributes\Post;
19
+
use Marko\Routing\Attributes\Delete;
20
20
use Marko\Http\ResponseInterface;
21
21
use Marko\Http\JsonResponse;
22
22
@@ -75,8 +75,8 @@ public function show(int $userId, int $postId): ResponseInterface
75
75
Apply middleware to routes using the `#[Middleware]` attribute:
76
76
77
77
```php
78
-
use Marko\Routing\Attribute\Get;
79
-
use Marko\Routing\Attribute\Middleware;
78
+
use Marko\Routing\Attributes\Get;
79
+
use Marko\Routing\Attributes\Middleware;
80
80
use Marko\Authentication\Middleware\AuthMiddleware;
81
81
82
82
class AdminController
@@ -112,14 +112,16 @@ Higher-priority modules can override routes from lower-priority modules. If `ven
112
112
113
113
## Disabling Routes
114
114
115
-
To remove a vendor route without replacing it, use the `#[DisableRoute]` attribute:
115
+
To remove a vendor route without replacing it, use the `#[DisableRoute]` attribute. Place it on a method that also has the route attribute you want to disable --- `#[DisableRoute]` takes no parameters and simply disables the route defined by the preceding routing attribute:
0 commit comments