Я полностью новичок в Laravel, поэтому, сэр, пожалуйста, помогите мне.
Я отправлю Image_Mode="Gallery"
от реакции axios.post()
и хочу получить значение Image_Mode
в laravel контроллере.
пример:
$img_mode = $request->input('img_mode');
РЕАКТИВНЫЙ КОД
fileUploadHandler = (e) => {let img_mode = ''; const config = {headers: {'Content-Type': 'multipart / form-data'}, img_mode: this.state.img_mode};
let formData = new FormData();
formData.append("file", this.state.selectedFile);
axios.post(`http://127.0.0.1:8000/api/ImageUpload`, formData,config,img_mode)
.then(res => {
console.log(res);
console.log(res.data);
})
}
![please see the image](https://i.stack.imgur.com/oa0bn.jpg)