add anywhere csrf protection
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{# app/Views/macros/forms.twig #}
|
||||
{% macro form_open(action, attributes = '') %}
|
||||
<form action="{{ action }}" method="post" {{ attributes|raw }}>
|
||||
{# Выводим глобальную переменную csrf_token #}
|
||||
{# Добавляем data-ajax="true" для автоматической CSRF защиты #}
|
||||
<form action="{{ action }}" method="post" data-ajax="true" {{ attributes|raw }}>
|
||||
{{ csrf_field()|raw }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user