Laravel csrf-token a la vista
<head>
<meta name="csrf-token" content="{{ csrf_token() }}" />
</head>
Smiling Starling
<head>
<meta name="csrf-token" content="{{ csrf_token() }}" />
</head>
data: {
"_token": "{{ csrf_token() }}",
"id": id
}
<meta name="csrf-token" content="{{ csrf_token() }}" />
<script type="text/javascript">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
</script>
{{ csrf_token() }}
{{ csrf_field() }}
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
"_token": "{{ csrf_token() }}",