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.
2 parents 1444df8 + 46bceaf commit 2e2afa7Copy full SHA for 2e2afa7
security/csrf.rst
@@ -233,7 +233,7 @@ object evaluated to the id::
233
use Symfony\Component\Security\Http\Attribute\IsCsrfTokenValid;
234
// ...
235
236
- #[IsCsrfTokenValid(new Expression('"delete-item-" ~ args["post"].id'), tokenKey: 'token')]
+ #[IsCsrfTokenValid(new Expression('"delete-item-" ~ args["post"].getId()'), tokenKey: 'token')]
237
public function delete(Post $post): Response
238
{
239
// ... do something, like deleting an object
0 commit comments