Edit on GitHub
Jump to docs navigation

Twig Components / Methods / csrf_token

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.

 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.