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

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

bodeezy/recaptcha
=================

reCAPTCHA Validator for Laravel 4

1.1.0(11y ago)0190MITPHPPHP &gt;=5.3.0

Since Apr 27Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (11)Used By (0)

Recaptcha
=========

[](#recaptcha)

A reCAPTCHA Validator for Laravel 4.

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

[](#installation)

Add the following line to the `require` section of `composer.json`:

```
{
    "require": {
        "bodeezy/recaptcha": "dev-master"
    }
}
```

Laravel 4 Setup
---------------

[](#laravel-4-setup)

1. Add `Greggilbert\Recaptcha\RecaptchaServiceProvider` to the service provider list in `app/config/app.php`.
2. Run `php artisan config:publish greggilbert/recaptcha`.
3. In `app/config/packages/greggilbert/recaptcha/config.php`, enter your reCAPTCHA public and private keys.
4. Add the following line into `app/lang/[lang]/validation.php`:

```
    "recaptcha" => 'The :attribute field is not correct.',
```

Usage
-----

[](#usage)

1. In your form, use `Form::captcha()` to echo out the markup.
2. In your validation rules, add the following:

```
    $rules = array(
        // ...
        'recaptcha_response_field' => 'required|recaptcha',
    };
```

It's also recommended to add `required` when validating.

Customization
-------------

[](#customization)

reCAPTCHA allows for customization of the widget through a number of options, listed [at the official documentation](https://developers.google.com/recaptcha/docs/customization). You can configure the output of the captcha in several ways.

In the `config.php`, you can create an `options` array to set the default behavior. For example:

```
    // ...
    'options' => array(
		'theme' => 'white',
	),
```

would default all the reCAPTCHAs to the white theme. If you want to further customize, you can pass options through the Form option:

```
echo Form::captcha(array('theme' => 'blackglass'));
```

Alternatively, if you want to set a default template instead of the standard one, you can use the config:

```
    // ...
    'template' => 'customCaptcha',
```

or you can pass it in through the Form option:

```
echo Form::captcha(array('template' => 'customCaptcha'));
```

Options passed into `Form::captcha` will always supercede the configuration.

To change the language of the captcha, simply pass in a language as part of the options:

```
    'options' => array(
        'lang' => 'fr',
	),
```

You can do this both in the config and through the `Form::captcha()` call.

V2 (No CAPTCHA reCAPTCHA) Support
---------------------------------

[](#v2-no-captcha-recaptcha-support)

To make use of the new reCAPTCHA (see ), you will need to enable the v2 setting in the config:

```
    // ...
    'v2' => true,
```

Note that you will also have to generate a new set of keys if you have previously used reCAPTCHA v1. You can request keys at:

The validation rules will also need to be modified to the below:

```
    $rules = array(
        // ...
        'g-recaptcha-response' => 'required|recaptcha',
    };
```

Limitation
----------

[](#limitation)

Because of Google's way of displaying the recaptcha, this package won't work if you load your form from an ajax call. If you need to do it you should use that method provided by Google :

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 55.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 ~73 days

Recently: every ~133 days

Total

9

Last Release

4180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cf646c13d779bbb0cc01cc7cd873894be5cda66a696753465d5235d48c7cf41?d=identicon)[bodeezy](/maintainers/bodeezy)

---

Top Contributors

[![greggilbert](https://avatars.githubusercontent.com/u/169482?v=4)](https://github.com/greggilbert "greggilbert (26 commits)")[![theothertomelliott](https://avatars.githubusercontent.com/u/1131428?v=4)](https://github.com/theothertomelliott "theothertomelliott (13 commits)")[![bodeezy](https://avatars.githubusercontent.com/u/4665051?v=4)](https://github.com/bodeezy "bodeezy (4 commits)")[![ChrisReid](https://avatars.githubusercontent.com/u/2385373?v=4)](https://github.com/ChrisReid "ChrisReid (1 commits)")[![elfif](https://avatars.githubusercontent.com/u/1546817?v=4)](https://github.com/elfif "elfif (1 commits)")[![HeathNaylor](https://avatars.githubusercontent.com/u/10814256?v=4)](https://github.com/HeathNaylor "HeathNaylor (1 commits)")[![lucacri](https://avatars.githubusercontent.com/u/2913531?v=4)](https://github.com/lucacri "lucacri (1 commits)")

---

Tags

laravelrecaptchacaptchalaravel4

### Embed Badge

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

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

###  Alternatives

[anhskohbo/no-captcha

No CAPTCHA reCAPTCHA For Laravel.

1.8k8.5M33](/packages/anhskohbo-no-captcha)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[buzz/laravel-google-captcha

Google captcha for Laravel

2071.1M2](/packages/buzz-laravel-google-captcha)

PHPackages © 2026

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