playkids/api-response
最新稳定版本:1.0.2
Composer 安装命令:
composer require playkids/api-response
包简介
Simple Api Response Library
README 文档
README
This is a simple project with the proposition to be a lib for apis and easy to develop. Principal use in your Laravel Project
To use in your project:
First needed to install the library, run follow command:
composer require playkids/simple-response
To use in your Laravel Project, follow steps:
on App\Http\Controllers\Controller;
Insert in your constructor this code
protected $response;
public function __construct()
{
$this->response = new ApiResponse();
}
After this All Your controllers with extends Controller can access ApiResponse methods
class ExampleController extends Controller
{
public function example()
{
return $this->response->successResponse('data');
}
}
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-12