Use fetch to send a request to the background, but the background can not receive the parameters passed in the past, showing that the received is null
Solution, add 'Content-Type': 'application / json' in the header information
Complete code:
fetch(url, { method: 'POST', headers: { 'X-CSRF-TOKEN': "{{csrf_token()}}", 'Content-Type': 'application/json' }, body:JSON.stringify(postData) })