写请楚一点,我这里是API,第三方提交的post数据,
我并不知道form-data会传来什么数据。
所以我要的是获取所有通过POST form-data提交过来的数据。
正常来说$request->all拿到的是前台传来的所有数据,
但是第三方提交过来的,使用$request->all并不能直接拿到form-data数据,
获者说我还没有发现可以直接拿到form-data的方法
现在只能用原生的方法拿..
自己解决了,$request->all可以拿到第三方通过GET提交的数据,但是POST的拿不到,可以使用getcontent拿到。
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.