From 834f27bf100e2f8ce7ce649a5f1501121c25455e Mon Sep 17 00:00:00 2001 From: jiannei Date: Sat, 20 Mar 2021 19:34:04 +0800 Subject: [PATCH] doc: Update Readme --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c340c4d..f732c65 100644 --- a/README.md +++ b/README.md @@ -127,27 +127,29 @@ public function array() } ``` -- 返回全部数据 +- 返回全部数据(支持自定义内层 data 字段名称,比如 rows、list) ```php { "status": "success", "code": 200, "message": "操作成功", - "data": [ - { - "nickname": "Joaquin Ondricka", - "email": "lowe.chaim@example.org" - }, - { - "nickname": "Jermain D'Amore", - "email": "reanna.marks@example.com" - }, - { - "nickname": "Erich Moore", - "email": "ernestine.koch@example.org" - } - ], + "data": { + "data": [ + { + "nickname": "Joaquin Ondricka", + "email": "lowe.chaim@example.org" + }, + { + "nickname": "Jermain D'Amore", + "email": "reanna.marks@example.com" + }, + { + "nickname": "Erich Moore", + "email": "ernestine.koch@example.org" + } + ] + }, "error": {} } ```