问答 / 1 / 5 / 创建于 3年前
就是接口返回的数据转成数组,直接找在线json转数组就可以了
不大懂,给个demo说明一下
json_decode($data,true)
public function retSuccess($data, array $meta = null, array $headers = [], $code = 200) { if ($meta === null) { $meta = new \stdClass(); } $ret = compact('data', 'meta', 'code'); throw new HttpResponseException(response(json_encode($ret), 200, $headers)); }
我要举报该,理由是:
推荐文章: