Laravel Meta Csrf
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
Exuberant Eel
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
<meta name="csrf-token" content="{{ csrf_token() }}">
<form method="POST" action="/profile">
@csrf
<input name="name">
<button type="submit">send</button>
</form>
<form action="{{ url('my-url') }}">
@csrf