We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 514482c commit 25a1a94Copy full SHA for 25a1a94
security/voters.rst
@@ -98,14 +98,15 @@ code like this:
98
// src/Controller/PostController.php
99
100
// ...
101
+ use App\Security\PostVoter;
102
103
class PostController extends AbstractController
104
{
105
#[Route('/posts/{id}', name: 'post_show')]
106
public function show(Post $post): Response
107
108
// check for "view" access: calls all voters
- $this->denyAccessUnlessGranted('PostVoter::VIEW', $post);
109
+ $this->denyAccessUnlessGranted(PostVoter::VIEW, $post);
110
111
112
}
0 commit comments