PHPackages                             torralbodavid/simple-recaptcha-v3 - 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. torralbodavid/simple-recaptcha-v3

ActiveLibrary[Security](/categories/security)

torralbodavid/simple-recaptcha-v3
=================================

Simple reCAPTCHA v3 integration

v1.5.0(4y ago)231202MITPHPPHP ^7.3|^8.0CI failing

Since May 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/torralbodavid/simple-recaptcha-v3)[ Packagist](https://packagist.org/packages/torralbodavid/simple-recaptcha-v3)[ Docs](https://github.com/torralbodavid/simple-recaptcha-v3)[ RSS](/packages/torralbodavid-simple-recaptcha-v3/feed)WikiDiscussions master Synced today

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

Simple reCAPTCHA v3 integration
===============================

[](#simple-recaptcha-v3-integration)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1c76ab375923a12191fb2eafba6b6378823a5ce019570b04c19bb4ed9744f030/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f7272616c626f64617669642f73696d706c652d7265636170746368612d76332e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/torralbodavid/simple-recaptcha-v3)[![GitHub Workflow Status](https://camo.githubusercontent.com/9ab096c3ffdda42eeb8ec40cf6fcee2af44d1612a21952a8108733cabc6fc666/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f7272616c626f64617669642f73696d706c652d7265636170746368612d76332f72756e2d74657374733f6c6162656c3d7465737473)](https://camo.githubusercontent.com/9ab096c3ffdda42eeb8ec40cf6fcee2af44d1612a21952a8108733cabc6fc666/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f7272616c626f64617669642f73696d706c652d7265636170746368612d76332f72756e2d74657374733f6c6162656c3d7465737473)[![Quality Score](https://camo.githubusercontent.com/c7d23762c206fb07b43213bffd0f74683b691310e3f05d16dbdd42a15911c489/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f7272616c626f64617669642f73696d706c652d7265636170746368612d76332e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/torralbodavid/simple-recaptcha-v3)[![Total Downloads](https://camo.githubusercontent.com/5f391c9c8616d609979e263da38f1231fa4b1f727e2466ec089e1899b2816f8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f7272616c626f64617669642f73696d706c652d7265636170746368612d76332e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/torralbodavid/simple-recaptcha-v3)

This repository contains simple reCAPTCHA v3 integration for your Laravel application.

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

[](#installation)

You can install the package via composer:

```
composer require torralbodavid/simple-recaptcha-v3
```

Usage
-----

[](#usage)

1. Set the following variables in your .env

Override xxxxx with your reCaptcha v3 keys. Get yours [here](https://www.google.com/recaptcha/admin)

```
CAPTCHA_SITE_KEY=xxxxx
CAPTCHA_SECRET_KEY=xxxxx

```

Optionally, you can publish the config file of the package. You will be able to customize advanced settings, such as:

- Disabling reCaptcha v3
- Minimum score you should get in order to validate your form
- Hostname validation
- Hide reCaptcha badge
- Prefer navigator language on reCaptcha badge

```
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=config
```

2. To get started, you must include at the very bottom of your head tag from the pages you want to protect with reCaptcha, the `@captcha_init` blade directive. This will start loading Google reCAPTCHA API.

```

            ...

            @captcha_init

```

3. Include below your form initialization tag, the `@captcha('xxxx')` blade directive. Replace xxxx with your desired [action](https://developers.google.com/recaptcha/docs/v3#actions).

```

        @captcha('login')
        ...

```

4. To sum up, add the following rule on your form validation:

```
    'recaptcha_response' => new Captcha
```

```
    use Torralbodavid\SimpleRecaptchaV3\Rules\Captcha;

    ...

    $request->validate([
        ...
        'recaptcha_response' => new Captcha,
    ]);
```

### Customize error messages

[](#customize-error-messages)

You can customize reCaptcha v3 error messages by publishing the translations on your project.

```
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=lang
```

### Customize snippets

[](#customize-snippets)

You can customize @captcha and @captcha\_init snippets by publishing the views on your project

```
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=views
```

### Disable reCaptcha v3 integration in tests

[](#disable-recaptcha-v3-integration-in-tests)

You can easily disable reCaptcha v3 integration in your tests by adding the following configuration on them

```
config()->set('simple-recaptcha-v3.active', false);
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [David Torralbo Pérez](https://github.com/torralbodavid)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Have fun!

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 97.3% 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 ~50 days

Recently: every ~158 days

Total

14

Last Release

1526d ago

PHP version history (4 changes)v1.0.0PHP ^7.1

v1.0.1PHP ^7.2

v1.0.6PHP ^7.3

v1.4.0PHP ^7.3|^8.0

### Community

Maintainers

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

---

Top Contributors

[![torralbodavid](https://avatars.githubusercontent.com/u/17132682?v=4)](https://github.com/torralbodavid "torralbodavid (108 commits)")[![gkaicb](https://avatars.githubusercontent.com/u/18529002?v=4)](https://github.com/gkaicb "gkaicb (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

captchahacktoberfestlaravel-applicationlaravel-packagelaravel-rulerecaptcharecaptcha-badgerecaptcha-v3recaptcha-v3-laravelrecaptcha-verificationsnippetstorralbodavidsimple-recaptcha-v3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/torralbodavid-simple-recaptcha-v3/health.svg)

```
[![Health](https://phpackages.com/badges/torralbodavid-simple-recaptcha-v3/health.svg)](https://phpackages.com/packages/torralbodavid-simple-recaptcha-v3)
```

###  Alternatives

[illuminate/encryption

The Illuminate Encryption package.

9229.7M278](/packages/illuminate-encryption)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[genealabs/laravel-governor

Managing policy and control in Laravel.

201262.8k](/packages/genealabs-laravel-governor)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

8745.6k](/packages/dgtlss-warden)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)

PHPackages © 2026

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