PHPackages                             gsystemsit/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. [Security](/categories/security)
4. /
5. gsystemsit/laravel-recaptchav3

ActiveLibrary[Security](/categories/security)

gsystemsit/laravel-recaptchav3
==============================

Recaptcha V3 for Laravel package

1.0.2(1y ago)020MITPHPPHP &gt;=7.1.0

Since Aug 2Pushed 1y agoCompare

[ Source](https://github.com/gsystemsit/laravel-recaptchav3)[ Packagist](https://packagist.org/packages/gsystemsit/laravel-recaptchav3)[ Docs](https://github.com/gsystemsit/laravel-recaptchav3)[ RSS](/packages/gsystemsit-laravel-recaptchav3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

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

[](#laravel-recaptcha-v3)

[![Build Status](https://github.com/josiasmontag/laravel-recaptchav3/actions/workflows/run-tests.yml/badge.svg)](https://github.com/josiasmontag/laravel-recaptchav3/actions/workflows/run-tests.yml)[![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). This is a lightweight package which focuses on the backend validation of Recaptcha V3 captchas.

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="GSystems\RecaptchaV3\Providers\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:

```
// Import the facade class
use GSystems\RecaptchaV3\Facades\RecaptchaV3;
//  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');
}
```

#### Custom validation error message

[](#custom-validation-error-message)

Add the following values to the `custom` array in the `validation` language file:

```
'custom' => [
    'g-recaptcha-response' => [
        'recaptchav3' => 'Captcha error message',
    ],
],
```

#### Hiding the ReCAPTCHA Badge

[](#hiding-the-recaptcha-badge)

Add to your CSS file:

```
.grecaptcha-badge { visibility: hidden !important; }
```

#### Localization

[](#localization)

By default, the package follows the default application locale, which is defined in `config/app.php`. If you want to change this behavior, you can specify what locale to use by adding a new environment variable :

```
RECAPTCHAV3_LOCALE=ar

```

#### Testing

[](#testing)

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

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 65.5% 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 ~5 days

Total

3

Last Release

638d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d8fa5804d2c981f859d18570cb0512408efeedc04c8b4eac2d84d84aafd10db?d=identicon)[gsystemsit](/maintainers/gsystemsit)

---

Top Contributors

[![josiasmontag](https://avatars.githubusercontent.com/u/1945577?v=4)](https://github.com/josiasmontag "josiasmontag (19 commits)")[![gsystemsit](https://avatars.githubusercontent.com/u/38344484?v=4)](https://github.com/gsystemsit "gsystemsit (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![tderick](https://avatars.githubusercontent.com/u/81715817?v=4)](https://github.com/tderick "tderick (2 commits)")[![bondif](https://avatars.githubusercontent.com/u/24433897?v=4)](https://github.com/bondif "bondif (1 commits)")[![Joeri-KIXX](https://avatars.githubusercontent.com/u/38066185?v=4)](https://github.com/Joeri-KIXX "Joeri-KIXX (1 commits)")

---

Tags

phplaravelrecaptchacaptcha

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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