Skip to content

Instantly share code, notes, and snippets.

@bernard-ng
Created December 23, 2020 13:56
Show Gist options
  • Save bernard-ng/be987dd5dfad32bd601babc4daedeb5d to your computer and use it in GitHub Desktop.
Save bernard-ng/be987dd5dfad32bd601babc4daedeb5d to your computer and use it in GitHub Desktop.
<form action="{{ path('admin_post_delete', { id: post.id }) }}" method="post">
{# l'argument de csrf_token() est une chaîne arbitraire utilisée pour générer le toke #}
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}"/>
<button type="submit">Delete item</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment