xxxxxxxxxx
<form method="POST" action="/profile">
@csrf
<!-- Equivalent to... -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
</form>
xxxxxxxxxx
Adding CSRF in Laravel:
3 ways we can add CSRF in Laravel.
@csrf OR {{ csrf_field() }} OR <input type="hidden" name="_token" value="{{ csrf_token() }}">
<form method="POST"<
// Generate hidden input field
@csrf
OR
{{ csrf_field() }}
OR
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>