Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 89d430a

Browse files
CJayHegitee-org
authored andcommitted
update phpzlc/controller.markdown.
Signed-off-by: Jay_he <1044295598@qq.com>
1 parent 823c552 commit 89d430a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

‎phpzlc/controller.markdown

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,31 @@ PHPZlc在原有基础上集成了最常见的API接口响应,定义了返回的
219219
```php
220220
return Responses::error(Errors::getError());
221221
```
222+
223+
4. 全局返回值机制
224+
225+
**调用示例:**
226+
227+
```php
228+
Responses::addGlobalData('name', '这是个全局参数');
229+
230+
return Responses::success('');
231+
```
232+
233+
**返回示例:**
234+
235+
```json
236+
{
237+
"code": 0,
238+
"msg": "",
239+
"msgInfo": [],
240+
"data": [],
241+
"system": {
242+
"name": "这是个全局参数"
243+
}
244+
}
245+
```
246+
247+
248+
222249

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /