PHPackages                             zlink/supports - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zlink/supports

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zlink/supports
==============

common components

v0.1(7y ago)19MITPHP

Since Jan 11Pushed 7y agoCompare

[ Source](https://github.com/zlink/supports)[ Packagist](https://packagist.org/packages/zlink/supports)[ RSS](/packages/zlink-supports/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

support
=======

[](#support)

common components

ResponseTriat Usage
-------------------

[](#responsetriat-usage)

用于规范统一响应消息体结构

```
use zlink\Supports\Triats\ResponseTriat;

class BaseController extends Controller
{
    use ResponseTriat;

    public function index()
    {
        $headers = [
            'Cache-Control': 'no-cache',
            'Content-Type': 'text/html; charset=utf-8',
        ];

        $message = 'request success';

        $data = [];

        // 直接返回
        return $this->success($message);

        // 返回json
        return $this->success($data);

        // 指定返回的http状态码
        return $this->setStatusCode(10000)->success($message);

        // 指定返回json结构 和 headers
        return $this->setStatusCode(10000)->respond([
            'code' => 10000,
            'message' => 'success',
            'data' => []
        ], $headers);

        return $this->message('message');

        return $this->failed("request faild");

        return $this->notLogin();

        return $this->notFound();

        return $this->internalError();

        return $this->created();
    }

}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2728d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6917126?v=4)[Zzz1丶](/maintainers/zlink)[@zlink](https://github.com/zlink)

---

Top Contributors

[![zlink](https://avatars.githubusercontent.com/u/6917126?v=4)](https://github.com/zlink "zlink (1 commits)")

---

Tags

respnosearraycollectionsupport

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zlink-supports/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M719](/packages/sylius-sylius)[spatie/laravel-export

Create a static site bundle from a Laravel app

673139.5k6](/packages/spatie-laravel-export)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[laravel/nightwatch

The official Laravel Nightwatch package.

36210.1M34](/packages/laravel-nightwatch)

PHPackages © 2026

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