kepsondiaz/httpjsonbridge
最新稳定版本:1.0.0
Composer 安装命令:
composer require kepsondiaz/httpjsonbridge
包简介
An elegant json response for your laravel api
README 文档
README
A simple way to define your Json Response for your Laravel's Api .
installation
composer require kepsondiaz/httpjsonbridge
Doc
Send a response based on the event that occurs when your api is called
send a Response when a badRequest occur. Status code 400
/** * Response with status code 400. */ return (new \Kepsondiaz\HttpJsonBridge\HttpJsonBridge)->badRequestApiResponse($message);
send a Response when response is OK.
/** * Response with status code 200. */ return (new \Kepsondiaz\HttpJsonBridge\HttpJsonBridge)->okApiResponse($data, $message);
send a Response when response when resource is not found
/** * Response with status code 404. */ return (new \Kepsondiaz\HttpJsonBridge\HttpJsonBridge)->notFoundApiResponse();
send a Response when response when user is unauthorised
/** * Response with status code 401. */ return (new \Kepsondiaz\HttpJsonBridge\HttpJsonBridge)->unauthorizedApiResponse();
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-04