bbweyne / restful-api
为 thinkphp5 定制的 RESTful API 包
1.0.0
2018-03-15 08:59 UTC
Requires
- ircmaxell/random-lib: ^1.2
- topthink/framework: ^5.0
This package is not auto-updated.
Last update: 2024-09-29 06:14:17 UTC
README
要求
PHP >= 5.5
说明
使用 thinkphp5 编写的 RESTful 风格 API,集 API 请求处理、权限认证、自动生成文档等功能;
- RESTful 风格处理请求
每个接口对应一个控制器,method 对应 [method] 方法响应
- 权限认证
Basic, Oauth Client Credentials Grant
- 文档生成
简洁、优雅,无需额外的文档工具;
安装
- 如果想在您的 TP5 项目中使用,可以直接使用
composer require bbweyne/restful-api
- 如果是新项目,先创建 TP5 项目,然后 require
composer create-project topthink/think api --prefer-dist
composer require bbweyne/restful-api
- 如果要使用生成文档,需要在 public/static/ 下安装 hadmin
cd /public/static/
git clone https://github.com/liushoukun/hadmin.git