I am performing the following POST request from my React component:
axios({
method: 'post',
url: '/build',
data: JSON.stringify({
title: stateCopy.title,
description: stateCopy.value,
hunter: stateCopy.selectedHunter.id,
encryption: stateCopy.encryption
})
})
.then(response => {
console.log(response)
})
.catch(errors => {
console.log("error: " + errors)
});
which posts to my Laravel controller where I would like to access title, description, hunter and encryption.
I tried a few options such as request('title'), request()->post() and $request->getContent() but was unable to access what I want. Could someone point me in the right direction?