Edit on GitHub
Jump to docs navigation

Twig Components / Methods / csrf_token

Note: You are currently reading the documentation for Bolt 5.0. Looking for the documentation for Bolt 5.2 instead?

csrf_token(intention) is a Twig function to render a CSRF token. Use this function if you want CSRF protection in a regular HTML form not managed by the Symfony Form component.

intention
 type: string - an arbitrary string used to identify the token.

Source: Twig



Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.