PHPackages                             233sec/laravel-recaptchav3 - 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. 233sec/laravel-recaptchav3

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

233sec/laravel-recaptchav3
==========================

Recaptcha V3 for Laravel package

1.0(6y ago)21.3k1MITPHPPHP &gt;=7.0.0

Since Dec 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xiaohuilam/laravel-recaptchav3)[ Packagist](https://packagist.org/packages/233sec/laravel-recaptchav3)[ Docs](https://github.com/233sec/laravel-recaptchav3)[ RSS](/packages/233sec-laravel-recaptchav3/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (4)Versions (7)Used By (1)

Laravel Recaptcha V3
====================

[](#laravel-recaptcha-v3)

[![Build Status](https://camo.githubusercontent.com/f9717601e086b533c111a4289c925a21f87f1db140568a397b55775340995407/68747470733a2f2f7472617669732d63692e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656361707463686176332e737667)](https://travis-ci.org/josiasmontag/laravel-recaptchav3)[![Total Downloads](https://camo.githubusercontent.com/955dda8b7d8fce2021879a241954bdea87ebf0c634ef8dc1dabde364452fb38d/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656361707463686176332f642f746f74616c2e737667)](https://packagist.org/packages/josiasmontag/laravel-recaptchav3)[![Latest Stable Version](https://camo.githubusercontent.com/22ce8d1696311c7ba89f85f83fda99862b5201557ee443ad339adaf551c14b64/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656361707463686176332f762f737461626c652e737667)](https://packagist.org/packages/josiasmontag/laravel-recaptchav3)[![License](https://camo.githubusercontent.com/901f653db7bed2c092647acbc1acd3c55cb867924e95229296b668d81f11acb5/68747470733a2f2f706f7365722e707567782e6f72672f6a6f736961736d6f6e7461672f6c61726176656c2d72656361707463686176332f6c6963656e73652e737667)](https://packagist.org/packages/josiasmontag/laravel-recaptchav3)

Laravel package for Google's [Recaptcha V3](https://developers.google.com/recaptcha/docs/v3).

Installation
------------

[](#installation)

To get started, use Composer to add the package to your project's dependencies:

```
composer require josiasmontag/laravel-recaptchav3

```

Add `RECAPTCHAV3_SITEKEY` and `RECAPTCHAV3_SECRET` to your `.env` file. (You can get them [here](https://www.google.com/recaptcha/admin#list))

```
RECAPTCHAV3_SITEKEY=sitekey
RECAPTCHAV3_SECRET=secret

```

Optionally, you can publish the config file:

```
php artisan vendor:publish --provider="Lunaweb\RecaptchaV3\RecaptchaV3ServiceProvider"

```

Usage
-----

[](#usage)

#### Init Recaptcha Javascript

[](#init-recaptcha-javascript)

Recaptcha v3 works best when it is loaded on every page to get the most context about interactions. Therefore, add to your header or footer template:

```
{!! RecaptchaV3::initJs() !!}
```

#### Forms

[](#forms)

`RecaptchaV3::field($action, $name='g-recaptcha-response')` creates an invisible input field that gets filled with a Recaptcha token on load.

```

    {!! RecaptchaV3::field('register') !!}

```

#### Validation

[](#validation)

Add the `recaptchav3` validator to the rules array. The rule accepts two parameters: The `action` name and the minimum required `score` (defaults to 0.5).

```
$validate = Validator::make(Input::all(), [
	'g-recaptcha-response' => 'required|recaptchav3:register,0.5'
]);
```

#### Getting the score

[](#getting-the-score)

Alternatively, you can get the score and take variable action:

```
//  RecaptchaV3::verify($token, $action)
$score = RecaptchaV3::verify($request->get('g-recaptcha-response'), 'register')
if($score > 0.7) {
    // go
} elseif($score > 0.3) {
    // require additional email verification
} else {
    return abort(400, 'You are most likely a bot');
}
```

#### Testing

[](#testing)

To make your forms testable, you can mock the `RecaptchaV3` facade:

```
RecaptchaV3::shouldReceive('verify')
    ->once()
    ->andReturn(1.0);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~36 days

Recently: every ~46 days

Total

6

Last Release

2534d ago

Major Versions

0.8 → 1.02019-06-04

PHP version history (2 changes)v0.3PHP &gt;=7.1.0

0.7PHP &gt;=7.0.0

### Community

Maintainers

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

---

Top Contributors

[![xiaohuilam](https://avatars.githubusercontent.com/u/6964962?v=4)](https://github.com/xiaohuilam "xiaohuilam (12 commits)")[![josiasmontag](https://avatars.githubusercontent.com/u/1945577?v=4)](https://github.com/josiasmontag "josiasmontag (2 commits)")

---

Tags

phplaravelrecaptchacaptcha

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/233sec-laravel-recaptchav3/health.svg)

```
[![Health](https://phpackages.com/badges/233sec-laravel-recaptchav3/health.svg)](https://phpackages.com/packages/233sec-laravel-recaptchav3)
```

###  Alternatives

[albertcht/invisible-recaptcha

Invisible reCAPTCHA For Laravel.

6031.6M6](/packages/albertcht-invisible-recaptcha)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[arcanedev/no-captcha

No CAPTCHA (new Google reCAPTCHA) with Laravel support

370730.4k6](/packages/arcanedev-no-captcha)

PHPackages © 2026

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