PHPackages                             wl1524520/response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wl1524520/response

ActiveLibrary

wl1524520/response
==================

Package description here.

056PHP

Since Jul 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wl1524520/response)[ Packagist](https://packagist.org/packages/wl1524520/response)[ RSS](/packages/wl1524520-response/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 API 响应定义
==========

[](#-api-响应定义-)

 .

安装
--

[](#安装)

```
$ composer require wl1524520/response -vvv
$ php artisan vendor:publish --tag=wanglu-response --force
```

使用
--

[](#使用)

在项目 composer.json 中添加如下项目

```
"autoload": {
    "files": [
        "app/response.php"
    ]
},
```

说明
--

[](#说明)

### 支持的 HTTP 状态码

[](#支持的-http-状态码)

状态码使用说明200成功, 用在不创建新资源的操作上201成功, 对创建新资源的 POST 操作进行响应400请求异常，比如请求中的 body 无法解析401没有进行认证或者认证非法403服务器已经理解请求，但是拒绝执行它404请求一个不存在的资源422用来表示校验错误500服务器内部错误### 返回数据的结构

[](#返回数据的结构)

```
200 和 201 接口返回，说明成功，返回的数据即为要传递给前端的数据；
4xx 和 500 返回说明出错，出错时返回的数据结构如下:

```

```
{
    "message": "出错信息",
    "errors": {
        "phone": [
            "手机号为必填项，参数名称 phone",
            "errors 字段为可选项"
        ]
    }
}
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/wl1524520/response/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/wl1524520/response/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/19c2855fe934dd99532e7c17b391dd1e1b199170613cb68b73ca90e1f8859ae6?d=identicon)[wl1524520](/maintainers/wl1524520)

---

Top Contributors

[![wl1524520](https://avatars.githubusercontent.com/u/9648792?v=4)](https://github.com/wl1524520 "wl1524520 (11 commits)")

### Embed Badge

![Health badge](/badges/wl1524520-response/health.svg)

```
[![Health](https://phpackages.com/badges/wl1524520-response/health.svg)](https://phpackages.com/packages/wl1524520-response)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
