PHPackages                             leruge/tp6-helper - 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. leruge/tp6-helper

Abandoned → [leruge/helper](/?search=leruge%2Fhelper)Library

leruge/tp6-helper
=================

适用于thinkphp6的一些常用函数

1.0.1(4y ago)0254MITPHP

Since Aug 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/leruge/tp6-helper)[ Packagist](https://packagist.org/packages/leruge/tp6-helper)[ RSS](/packages/leruge-tp6-helper/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

封装一些经常用的函数
==========

[](#封装一些经常用的函数)

1. check\_captcha($phone, $code, $msg) 验证验证码是否正确，测试账号不验证，万能验证码888888
2. 在extra.php中配置test\_account测试账号，数组格式

参数含义phone手机号code验证码msg错误提示信息1. format\_time($time, $type) 格式化时间

参数含义time需要格式化的时间type1是Y-m-d H:i:s；2是Y-m-d H:i；3是Y-m-d；4是聊天时间1. generate\_nickname() 生成昵称
2. handle\_get\_pic($pics, $type) 生成可直接访问的地址

参数含义$pics图片，多张使用逗号分隔type1是单张需要默认；2是多张；3是单张不需要默认；4多张中取一张有默认1. handle\_set\_pic($pics, $type = 1) 生成不带域名的地址

参数含义$pics图片，多张使用逗号分隔type1是单张；2是多张1. handle\_set\_content($content) 生成不带域名的富文本

参数含义content富文本内容1. handle\_get\_content($content = null) 生成带域名的富文本

参数含义content富文本内容1. handle\_get\_num($num = null) 生成带w的数字

参数含义num数字1. handle\_set\_num($num) 转换成数字

参数含义num数字1. generate\_room\_num($fromId, $toId) 生成聊天房间号

参数含义fromID发送者IDtoID接受者ID1. result($data = null, $code, $msg = '操作成功', $url = null)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

1728d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2518593dfbc67ba8bc8e39bb30541fa3d8a7002f87240f2f8a6b99f26e4c9eb?d=identicon)[leruge@163.com](/maintainers/leruge@163.com)

---

Top Contributors

[![leruge](https://avatars.githubusercontent.com/u/33196309?v=4)](https://github.com/leruge "leruge (8 commits)")

### Embed Badge

![Health badge](/badges/leruge-tp6-helper/health.svg)

```
[![Health](https://phpackages.com/badges/leruge-tp6-helper/health.svg)](https://phpackages.com/packages/leruge-tp6-helper)
```

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[topthink/think-queue

The ThinkPHP6 Queue Package

640675.0k75](/packages/topthink-think-queue)[topthink/think-swoole

Swoole extend for thinkphp

477174.4k19](/packages/topthink-think-swoole)[topthink/think-captcha

captcha package for thinkphp

132934.4k67](/packages/topthink-think-captcha)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[topthink/think-migration

96460.8k121](/packages/topthink-think-migration)

PHPackages © 2026

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