PHPackages                             garbinmarcelo/invisible-recaptcha - 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. garbinmarcelo/invisible-recaptcha

ActiveLibrary

garbinmarcelo/invisible-recaptcha
=================================

Invisible reCAPTCHA For Laravel.

1.0.0(1y ago)022MITPHPPHP ^5.6.4 || ^7.0 || ^8.0 || ^8.1

Since Jun 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/garbinmarcelo/invisible-recaptcha)[ Packagist](https://packagist.org/packages/garbinmarcelo/invisible-recaptcha)[ RSS](/packages/garbinmarcelo-invisible-recaptcha/feed)WikiDiscussions master Synced 1mo ago

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

Laravel Invisible reCAPTCHA
===========================

[](#laravel-invisible-recaptcha)

[![invisible_recaptcha_demo](https://camo.githubusercontent.com/db912f64af2f54c24e06ad603639f6824ea73addffa3ceb3f6328913982d2cf5/687474703a2f2f692e696d6775722e636f6d2f31645a39584b6e2e706e67)](https://camo.githubusercontent.com/db912f64af2f54c24e06ad603639f6824ea73addffa3ceb3f6328913982d2cf5/687474703a2f2f692e696d6775722e636f6d2f31645a39584b6e2e706e67)

Why Invisible reCAPTCHA?
------------------------

[](#why-invisible-recaptcha)

Invisible reCAPTCHA is an improved version of reCAPTCHA v2(no captcha). In reCAPTCHA v2, users need to click the button: "I'm not a robot" to prove they are human. In invisible reCAPTCHA, there will be not embed a captcha box for users to click. It's totally invisible! Only the badge will show on the buttom of the page to hint users that your website is using this technology. (The badge could be hidden, but not suggested.)

Notice
------

[](#notice)

- The master branch doesn't support multi captchas feature, please use `multi-forms` branch if you need it. (**Most of the time you are misusing recaptcha when you try to put multiple captchas in one page.**)

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

[](#installation)

```
composer require garbinmarcelo/invisible-recaptcha

```

Laravel 5
---------

[](#laravel-5)

### Setup

[](#setup)

Add ServiceProvider to the providers array in `app/config/app.php`.

```
GarbinMarcelo\InvisibleReCaptcha\InvisibleReCaptchaServiceProvider::class,

```

> It also supports package discovery for Laravel 5.5.

### Configuration

[](#configuration)

Before you set your config, remember to choose `invisible reCAPTCHA` while applying for keys. [![invisible_recaptcha_setting](https://camo.githubusercontent.com/bc407e52682a0ddbd067c418416e1307c9ddcd0ef16b51bbac6d414277dadbe4/687474703a2f2f692e696d6775722e636f6d2f7a49416c4b62592e6a7067)](https://camo.githubusercontent.com/bc407e52682a0ddbd067c418416e1307c9ddcd0ef16b51bbac6d414277dadbe4/687474703a2f2f692e696d6775722e636f6d2f7a49416c4b62592e6a7067)

Add `INVISIBLE_RECAPTCHA_SITEKEY`, `INVISIBLE_RECAPTCHA_SECRETKEY` to **.env** file.

```
// required
INVISIBLE_RECAPTCHA_SITEKEY={siteKey}
INVISIBLE_RECAPTCHA_SECRETKEY={secretKey}

// optional
INVISIBLE_RECAPTCHA_BADGEHIDE=false
INVISIBLE_RECAPTCHA_DATABADGE='bottomright'
INVISIBLE_RECAPTCHA_TIMEOUT=5
INVISIBLE_RECAPTCHA_DEBUG=false

```

> There are three different captcha styles you can set: `bottomright`, `bottomleft`, `inline`

> If you set `INVISIBLE_RECAPTCHA_BADGEHIDE` to true, you can hide the badge logo.

> You can see the binding status of those catcha elements on browser console by setting `INVISIBLE_RECAPTCHA_DEBUG` as true.

### Usage

[](#usage)

Before you render the captcha, please keep those notices in mind:

- `render()` or `renderHTML()` function needs to be called within a form element.
- You have to ensure the `type` attribute of your submit button has to be `submit`.
- There can only be one submit button in your form.

##### Display reCAPTCHA in Your View

[](#display-recaptcha-in-your-view)

```
{!! app('captcha')->render() !!}

// or you can use this in blade
@captcha
```

With custom language support:

```
{!! app('captcha')->render('en') !!}

// or you can use this in blade
@captcha('en')
```

##### Usage with Javascript frameworks like VueJS:

[](#usage-with-javascript-frameworks-like-vuejs)

The `render()` process includes three distinct sections that can be rendered separately incase you're using the package with a framework like VueJS which throws console errors when `` tags are included in templates.

You can render the polyfill (do this somewhere like the head of your HTML:)

```
{!! app('captcha')->renderPolyfill() !!}
// Or with blade directive:
@captchaPolyfill
```

You can render the HTML using this following, this needs to be INSIDE your `` tag:

```
{!! app('captcha')->renderCaptchaHTML() !!}
// Or with blade directive:
@captchaHTML
```

And you can render the neccessary `` tags including the optional language support by using:

```
// The argument is optional.
{!! app('captcha')->renderFooterJS('en') !!}

// Or with blade directive:
@captchaScripts
// blade directive, with language support:
@captchaScripts('en')
```

##### Validation

[](#validation)

Add `'g-recaptcha-response' => 'required|captcha'` to rules array.

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

Take Control of Submit Function
-------------------------------

[](#take-control-of-submit-function)

Use this function only when you need to take all control after clicking submit button. Recaptcha validation will not be triggered if you return false in this function.

```
_beforeSubmit = function(e) {
    console.log('submit button clicked.');
    // do other things before captcha validation
    // e represents reference to original form submit event
    // return true if you want to continue triggering captcha validation, otherwise return false
    return false;
}
```

Customize Submit Function
-------------------------

[](#customize-submit-function)

If you want to customize your submit function, for example: doing something after click the submit button or changing your submit to ajax call, etc.

The only thing you need to do is to implement `_submitEvent` in javascript

```
_submitEvent = function() {
    console.log('submit button clicked.');
    // write your logic here
    // submit your form
    _submitForm();
}
```

Here's an example to use an ajax submit (using jquery selector)

```
_submitEvent = function() {
    $.ajax({
        type: "POST",
        url: "{{route('message.send')}}",
         data: {
            "name": $("#name").val(),
            "email": $("#email").val(),
            "content": $("#content").val(),
            // important! don't forget to send `g-recaptcha-response`
            "g-recaptcha-response": $("#g-recaptcha-response").val()
        },
        dataType: "json",
        success: function(data) {
            // success logic
        },
        error: function(data) {
            // error logic
        }
    });
};
```

Credits
-------

[](#credits)

- anhskohbo (the author of no-captcha package)
- albertcht (the author of the original package)
- [Contributors](https://github.com/garbinmarcelo//graphs/contributors)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 68.8% 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

568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/238077ad49c26c18153f116bc4bdd3ae716cabf8549066ff24a209e6ff8bf739?d=identicon)[garbinmarcelo](/maintainers/garbinmarcelo)

---

Top Contributors

[![albertcht](https://avatars.githubusercontent.com/u/9117929?v=4)](https://github.com/albertcht "albertcht (97 commits)")[![garbinmarcelo](https://avatars.githubusercontent.com/u/9335588?v=4)](https://github.com/garbinmarcelo "garbinmarcelo (9 commits)")[![danmatthews](https://avatars.githubusercontent.com/u/149426?v=4)](https://github.com/danmatthews "danmatthews (7 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![jochensengier](https://avatars.githubusercontent.com/u/10118729?v=4)](https://github.com/jochensengier "jochensengier (2 commits)")[![Marko-M](https://avatars.githubusercontent.com/u/1738436?v=4)](https://github.com/Marko-M "Marko-M (2 commits)")[![mvasilyev](https://avatars.githubusercontent.com/u/4038111?v=4)](https://github.com/mvasilyev "mvasilyev (2 commits)")[![sumityadav](https://avatars.githubusercontent.com/u/169143?v=4)](https://github.com/sumityadav "sumityadav (2 commits)")[![guiwoda](https://avatars.githubusercontent.com/u/1625545?v=4)](https://github.com/guiwoda "guiwoda (1 commits)")[![hedii](https://avatars.githubusercontent.com/u/5358048?v=4)](https://github.com/hedii "hedii (1 commits)")[![sald19](https://avatars.githubusercontent.com/u/1674971?v=4)](https://github.com/sald19 "sald19 (1 commits)")[![BrandonSurowiec](https://avatars.githubusercontent.com/u/5625680?v=4)](https://github.com/BrandonSurowiec "BrandonSurowiec (1 commits)")[![storyn26383](https://avatars.githubusercontent.com/u/6954098?v=4)](https://github.com/storyn26383 "storyn26383 (1 commits)")[![boblennes](https://avatars.githubusercontent.com/u/5143474?v=4)](https://github.com/boblennes "boblennes (1 commits)")[![yasiao](https://avatars.githubusercontent.com/u/9282137?v=4)](https://github.com/yasiao "yasiao (1 commits)")[![neamtua](https://avatars.githubusercontent.com/u/1029457?v=4)](https://github.com/neamtua "neamtua (1 commits)")[![QuentinBontemps](https://avatars.githubusercontent.com/u/4568504?v=4)](https://github.com/QuentinBontemps "QuentinBontemps (1 commits)")[![realanmup](https://avatars.githubusercontent.com/u/25292662?v=4)](https://github.com/realanmup "realanmup (1 commits)")[![rhynodesigns](https://avatars.githubusercontent.com/u/2198266?v=4)](https://github.com/rhynodesigns "rhynodesigns (1 commits)")

---

Tags

phplaravelrecaptchacaptchalaravel5invisibleno-captchainvisible-recaptcha

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/garbinmarcelo-invisible-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/garbinmarcelo-invisible-recaptcha/health.svg)](https://phpackages.com/packages/garbinmarcelo-invisible-recaptcha)
```

###  Alternatives

[albertcht/invisible-recaptcha

Invisible reCAPTCHA For Laravel.

6031.6M6](/packages/albertcht-invisible-recaptcha)

PHPackages © 2026

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