Please be clear when writing, this is API, post data submitted by a third party,
I don’t know what data form-data will send.
So what I want is to get all the data submitted through POST form-data.
Normally speaking, $request->all gets all the data from the front desk,
However, if it is submitted by a third party, using $request->all cannot directly obtain the form-data data.
The winner said that I haven’t found a way to get form-data directly
Now you can only use the native method to get it..
I solved it myself. $request->all can get the data submitted by the third party through GET, but cannot get it through POST. You can use getcontent to get it.
I did it myself. None of the methods you mentioned can work. request->all obtains get. Post cannot be obtained by this method. You need to use getcount. I don’t know how you feel about those few points. It doesn’t matter. I took care of it myself.
can be accessed via
Request
对象来获取。如获取表单全部数据,
$request->all()
。获取表单中键名为name的字段,
$request->get('name')
.For detailed information, please refer to the official documentation.
I wrote a Demo on GitHub, you can take a look. https://github.com/MhcII/Form...
$request->all() can still be retrieved. I just tested this code and it works.