The information which I got by my previous question Vuex + Laravel. Why axios sends any values but only not that one, which come's with method's parameter? works only for situation when I pass only one argument in axios. I also found how to successfully pass multiple files with one argument, but in my situation, I have to use object, to be able to pass more than one argument. So instead of
const response = await axios.post('/posts', data)
I have to use the next one
const response = await axios.post('/posts', {
formData:data,
body:postBody
})
I thought it would be easy, but now is the 5-th hour that I can't find the solution.
controller
public function store(Request $request)
{
$files = $request->all();
return var_dump($files);
}
I tried many things, included $request->allFiles() and getClientOriginalExtension() experiments. No results. What versions do you have? How this problem can be fixed?
Important!
I use Laravel, vuex, axios.
I use text not in FormData cause it's textArea. And if I can combinate textarea in FormData to make one argument axios call, anyway it still very important to me to know what's the problem which I described above.
Updated
Here's chrome's payload tab