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 ec50e77 commit fd62622Copy full SHA for fd62622
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