eliseekn/laravel-api-response
最新稳定版本:v0.0.4
Composer 安装命令:
composer require eliseekn/laravel-api-response
包简介
Send JSON response from your API.
README 文档
README
Send JSON response from your API.
Installation
composer require eliseekn/laravel-api-response
Usage
Add MakeApiResponse trait where you need to use and use it as follows :
$this->response('success', 'Lorem ipsum dolor sit amet', 201); $this->response('warning', [ 'key1' => 'value', 'key2' => 'value' ], 405); $this->successResponse('Lorem ipsum dolor sit amet'); $this->successResponse([ 'key1' => 'value', 'key2' => 'value' ]); $this->errorResponse(...);
统计信息
- 总下载量: 115
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-14