https://github.com/jader/thinkphp-test
thinkphp api test
https://github.com/jader/thinkphp-test
Last synced: about 1 year ago
JSON representation
thinkphp api test
- Host: GitHub
- URL: https://github.com/jader/thinkphp-test
- Owner: Jader
- License: other
- Created: 2024-06-19T11:38:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T04:51:54.000Z (about 2 years ago)
- Last Synced: 2025-02-04T19:42:03.679Z (over 1 year ago)
- Language: PHP
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## 简易版 thinkphp api 测试
### 目录结构
```
project_root/
|-- app/
| |-- controller/
| | |-- Login.php
| |-- middleware/
| | |-- AuthMiddleware.php
| |-- service/
| | |-- UserService.php
| |-- model/
| | |-- User.php
| |-- dao/
| | |-- UserDao.php
|-- config/
| |-- auth.php
|-- route/
| |-- app.php
|-- composer.json
```
### 测试登录API
```sh
curl -X POST http://your_domain.com/user/login -d "username=your_username&password=your_password"
```
### 测试业务API
```sh
curl -X GET http://your_domain.combusiness/user/userinfo -H "Authorization: Bearer your_jwt_token"
```