PHPackages                             jncinet/qihucms-present - 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. jncinet/qihucms-present

ActiveLibrary

jncinet/qihucms-present
=======================

qihucms present.

1.0.1(5y ago)06MITPHP

Since Dec 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jncinet/qihucms-present)[ Packagist](https://packagist.org/packages/jncinet/qihucms-present)[ Docs](https://www.qihucms.com)[ RSS](/packages/jncinet-qihucms-present/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

安装
--

[](#安装)

```
$ composer require jncinet/qihucms-present
```

使用
--

[](#使用)

### 数据迁移

[](#数据迁移)

```
$ php artisan migrate
```

### 发布资源

[](#发布资源)

```
$ php artisan vendor:publish --provider="Qihucms\Present\PresentServiceProvider"
```

后台菜单
----

[](#后台菜单)

- 礼物列表 `present/presents`
- 礼物订单 `present/orders`

### 路由能参数说明

[](#路由能参数说明)

#### 礼物列表

[](#礼物列表)

```
route('api.present.index')
请求：GET
地址：/present/presents?pay_type_id={$pay_type_id}&...&page={$page}&limit={$limit}
参数：
int          $pay_type_id      （选填）支付货币类型
int          $exchange_type_id （选填）兑换货币类型
string       $name             （选填）根据礼物名模糊查询
int          $page             （选填）页码
int          $limit            （选填）每页显示的条数
返回值：
{
    data: [
        {
            id：礼物ID
            name：礼物名字
            thumbnail：礼物小图
            image：礼物大图
            animation：动画
            pay_currency_type：付款币类型
            pay_amount：付款数额
            unit: 礼物计数单位,
        },
        ...
    ],
    meta: {},
    links: {}
}
```

#### 礼物订单列表

[](#礼物订单列表)

```
route('api.present.order')
请求：GET
地址：/present/orders?user_id={$user_id}&...&page={$page}&limit={$limit}
参数：
int          $user_id          （选填）送礼物会员ID
int          $to_user_id       （选填）收礼物会员ID
int          $present_id       （选填）礼物ID
0|1          $type             （选填）送出的礼物0、收到的礼物1
0|1|2        $status           （选填）礼物订单状态0失败订单，1成功订单，2异常订单
int          $page             （选填）页码
int          $limit            （选填）每页显示的条数
返回值：
{
    data: [
        {
            id：礼物ID
            present：{礼物信息}
            to_user：{收礼会员信息}  // 参数type为0时存在
            to_user_id：收礼会员ID  // 参数type为1时存在
            user：{送礼会员信息}    // 参数type为1时存在
            user_id：送礼会员ID    // 参数type为0时存在
            status：订单状态
            created_at：创建时间
            updated_at: 更新时间,
        },
        ...
    ],
    meta: {},
    links: {}
}
```

#### 送礼物

[](#送礼物)

```
route('api.present.givings')
请求：POST
地址：/present/givings
参数：
int $present_id （必填）礼物ID
int $to_user_id （必填）收礼会员ID
返回值：
{
    status: 'SUCCESS',
    result: {
        to_user_id: 礼物ID
        present_id：收礼会员ID
    }
}
```

### 事件调用

[](#事件调用)

```
// 创建订单
Qihucms\Present\Events\GivingPresent
```

数据库
---

[](#数据库)

### 礼物表：presents

[](#礼物表presents)

FieldTypeLengthAllowNullDefaultCommentidbigintnamevarchar55礼物名称thumbnailvarchar255YNULL礼物图标imagevarchar255YNULL礼物大图animationvarchar255YNULL礼物动效pay\_currency\_type\_idbigint支付货币类型pay\_amountdecimal0.00支付数额unitvarchar15计数单位exchange\_currency\_type\_idbigint兑换货币类型exchange\_amountdecimal0.00兑换数额exchange\_expint0兑换经验is\_broadcasttinyint0是否广播statustinyint0状态sortint0排序created\_attimestampYNULL创建时间updated\_attimestampYNULL更新时间### 礼物订单表：present\_orders

[](#礼物订单表present_orders)

FieldTypeLengthAllowNullDefaultCommentidbigintuser\_idbigint送礼会员idto\_user\_idbigint收礼会员idpresent\_idbigint礼物idstatustinyint0状态created\_attimestampYNULL创建时间updated\_attimestampYNULL更新时间

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

1960d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/63541651e21494722aa0d364dca6dbaa132d0ee4e9f85a741b5eff8c587f57ba?d=identicon)[jncinet](/maintainers/jncinet)

---

Tags

presentqihucms

### Embed Badge

![Health badge](/badges/jncinet-qihucms-present/health.svg)

```
[![Health](https://phpackages.com/badges/jncinet-qihucms-present/health.svg)](https://phpackages.com/packages/jncinet-qihucms-present)
```

PHPackages © 2026

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