PHPackages                             oh86/laravel-captcha-sms - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. oh86/laravel-captcha-sms

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

oh86/laravel-captcha-sms
========================

sms captcha for oh86/laravel-captcha

v1.0.0(8mo ago)014MITPHPPHP ^7.4 || ^8.0

Since Aug 18Pushed 8mo agoCompare

[ Source](https://github.com/OneHundred86/laravel-captcha-sms)[ Packagist](https://packagist.org/packages/oh86/laravel-captcha-sms)[ RSS](/packages/oh86-laravel-captcha-sms/feed)WikiDiscussions main Synced 1mo ago

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

验证码-短信验证码
=========

[](#验证码-短信验证码)

### 一、安装

[](#一安装)

```
composer require oh86/laravel-captcha
composer require oh86/laravel-captcha-sms
# 可选项
# composer require tencentcloud/sms
```

### 二、配置 `config/captcha.php`

[](#二配置-configcaptchaphp)

```
return [
    'default' => env('CAPTCHA_DEFAULT_DRIVER', 'sms'),

    // ...

    // 短信验证码
    'sms' => [
        'smsDriver' => 'tencentCloud',  // sms.drivers.xxx
        // 验证码配置
        'captcha' => [
            'characters' => ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
            'length' => 6,   // 验证码长度
            'expire' => 300, // 验证码有效期，单位为秒
            'maxAttempts' => 5, // 最大尝试次数
            'reuseable' => false, // 在有效期内是否可重用验证码
            'acquire_next_after' => 60, // 获取验证码的频率，单位秒
        ],
    ],
];
```

### 三、使用示例

[](#三使用示例)

```
use Oh86\Captcha\Facades\Captcha;

// demo1
$key = Captcha::driver('sms')->acquire(['phone' => '13800138000']);
/** @var bool */
$result = Captcha::driver('sms')->verify(['key' => $key, 'value' => '066611', 'phone' => '13800138000']);

// demo2
$key = Captcha::driver('sms')->acquire(['phone' => '13800138000', 'countryCode' => '86']);
/** @var bool */
$result = Captcha::driver('sms')->verify(['key' => $key, 'value' => '066611', 'phone' => '13800138000', 'countryCode' => '86']);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance58

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

267d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3f893211000acbd1a600e2159a778865e4f7e54661239721c9fb5c240d7626b?d=identicon)[oh86](/maintainers/oh86)

---

Top Contributors

[![OneHundred86](https://avatars.githubusercontent.com/u/22148561?v=4)](https://github.com/OneHundred86 "OneHundred86 (6 commits)")

### Embed Badge

![Health badge](/badges/oh86-laravel-captcha-sms/health.svg)

```
[![Health](https://phpackages.com/badges/oh86-laravel-captcha-sms/health.svg)](https://phpackages.com/packages/oh86-laravel-captcha-sms)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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