0👍
Use this code in the page header:
<meta name="csrf-token" id="token" content="{{ csrf_token() }}">
inside the script
tag add:
window.Laravel = {csrfToken: '{{ csrf_token() }}'}
and the axios
request:
axios.post('http://localhost:6080/auth', {
email: email,
password: password,
csrf_token:window.Laravel
}).then(response => {
console.log(response)
return response
})
Source:stackexchange.com