PHPackages                             hitmanv/laverify - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. hitmanv/laverify

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

hitmanv/laverify
================

verify code

v1.0.0(5y ago)018MITPHP

Since Aug 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Hitmanv/laverify)[ Packagist](https://packagist.org/packages/hitmanv/laverify)[ RSS](/packages/hitmanv-laverify/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laverify
========

[](#laverify)

验证码简化

安装
--

[](#安装)

```
composer require hitmanv/laverify
```

用法
--

[](#用法)

```
use Hitmanv\Laverify\VerifyCode;

// 生成验证码
// type -> 不同用途的验证码
// target -> 验证码对象 手机号码或邮箱等
VerifyCode::gen($type, $target, $ttl=300);
VerifyCode::verify($type, $target, $code);
```

中间件使用

```
// kernel 添加
'vc' => Hitmanv\Laverify\VerifyCodeMiddleware::class,

// 使用
// target_key -> 请求中验证码对象的键
// code_key -> 请求中验证码的键
someroute()->middleware('vc:type,target_key,code_key')
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

2086d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1020820?v=4)[hitmanv](/maintainers/hitmanv)[@Hitmanv](https://github.com/Hitmanv)

---

Top Contributors

[![hitmanvi](https://avatars.githubusercontent.com/u/181323046?v=4)](https://github.com/hitmanvi "hitmanvi (7 commits)")

### Embed Badge

![Health badge](/badges/hitmanv-laverify/health.svg)

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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