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 c51f88c + fd62622 commit 46bceafCopy full SHA for 46bceaf
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