PHPackages                             kingbes/attribute - 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. kingbes/attribute

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

kingbes/attribute
=================

Webman plugin kingbes/attribute

v1.0.1(2mo ago)435MITPHPPHP &gt;8.0

Since Jan 11Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/KingBes/Attribute)[ Packagist](https://packagist.org/packages/kingbes/attribute)[ RSS](/packages/kingbes-attribute/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Attribute
=========

[](#attribute)

🚀 🔥 🌈 基于webman使用 KingBes/Attribute 包实现的注解路由，中间件，权限标识，视图标识等解决方案

PHP8的注解方案
=========

[](#php8的注解方案)

更新日志
----

[](#更新日志)

### v1.0.1

[](#v101)

获取注解信息

```
use Kingbes\Attribute\Data; //引入

Data::$data // 获取全部注解信息
```

安装
--

[](#安装)

```
composer require kingbes/attribute
```

使用，建议结合php8的命名参数使用
------------------

[](#使用建议结合php8的命名参数使用)

```
use Kingbes\Attribute\Annotation; //引入

#[Annotation([
    "title": "首页的",
])]
class IndexController
{
    #[Annotation([
        "title": "首页",
        "path": ["/index", "/", "/home"],
        "request": ["get", "post"],
        "auth": true,
        ])]
    public function index(Request $request)
    {
        return json(Annotation::data());
    }
}
```

request 默认：\['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'\] middleware 默认： \[\] path 默认： \[\] ，path 为空时，会自动获取类名和方法名作为路由

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance87

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~419 days

Total

3

Last Release

65d ago

Major Versions

0.0.1 → 1.0.02024-01-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48203677?v=4)[kllxs](/maintainers/KingBes)[@KingBes](https://github.com/KingBes)

---

Top Contributors

[![KingBes](https://avatars.githubusercontent.com/u/48203677?v=4)](https://github.com/KingBes "KingBes (12 commits)")

### Embed Badge

![Health badge](/badges/kingbes-attribute/health.svg)

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

PHPackages © 2026

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