分享 / 3 / 6 / 创建于 9年前
外部请求laravel ,$request->all();接收不到数据,难道要用file_get_conents???laravel内有没有别的方法
{"Content-Type":"application/x-www-form-urlencoded"}
PUT 方式可用 “$request->getContent()” 获取
PUT 发送类型为 {"Content-Type":"application/json"} 可用下面方法获取 id
{"Content-Type":"application/json"}
id
public function test(Request $request) { $id = $request->get('id'); echo $id; }
我要举报该,理由是:
推荐文章: