feat(controller): 增加了一个 Rest 风格的 trait

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-07-21 10:54:33 +08:00
parent fd788a7eb8
commit 68844a6132
4 changed files with 92 additions and 49 deletions

12
docs/REST 控制器.md Normal file
View File

@@ -0,0 +1,12 @@
# REST 资源控制器支持
## 列表的筛选、排序
* [**RestfulList**](../src/Traits/RestfulList.php)
### RestfulList
在 AbstractController 中已经默认进行了集成
- parseParameters 用来解析请求
- responseFormatter 用来将 builder 转化成响应
- restSelect 额外的语法糖,调用了上面的两个方法