PHPackages                             noylecorp/laravel-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. noylecorp/laravel-recaptcha

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

noylecorp/laravel-recaptcha
===========================

Laravel package for Google's ReCAPTCHA service

v0.4.1(10y ago)311.1k2MITPHPPHP &gt;=5.5.9

Since Sep 18Pushed 10y ago1 watchersCompare

[ Source](https://github.com/noylecorp/laravel-recaptcha)[ Packagist](https://packagist.org/packages/noylecorp/laravel-recaptcha)[ RSS](/packages/noylecorp-laravel-recaptcha/feed)WikiDiscussions master Synced 2d ago

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

[![Build Status](https://camo.githubusercontent.com/af6ae751be39499f255156467624bfb4181b53123798980a214f3c19e6b824d1/68747470733a2f2f7472617669732d63692e6f72672f6e6f796c65636f72702f6c61726176656c2d7265636170746368612e737667)](https://travis-ci.org/noylecorp/laravel-recaptcha)

Laravel Recaptcha
=================

[](#laravel-recaptcha)

Laravel 5.1 package for Google reCAPTCHA, providing helper functions for creating reCAPTCHA fields and a service for validating responses.

**Note:** This package uses reCAPTCHA API version 2.0

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

[](#installation)

Install Laravel Recaptcha with composer:

```
composer require noylecorp/laravel-recaptcha

```

Next, add the service provider to your `config/app.php`:

```
'providers' => [
    // ...
    Noylecorp\Recaptcha\RecaptchaServiceProvider::class,
]

```

Next, publish the package configuration file to your application:

```
php artisan vendor:publish --provider="Noylecorp\Recaptcha\RecaptchaServiceProvider"

```

The file `recaptcha.php` gets copied into your configuration directory. The final installation step is to add your reCAPTCHA site and secret keys to your `.env` file:

```
RECAPTCHA_SITE_KEY=your-site-key
RECAPTCHA_SECRET_KEY=your-secret-key

```

If you don't have reCAPTCHA keys you can signs up for a pair [here](https://www.google.com/recaptcha/admin).

Usage
-----

[](#usage)

### Creating a reCAPTCHA widget

[](#creating-a-recaptcha-widget)

Easily create reCAPTCHA widgets using the `recaptcha()` helper function:

```
{!! recaptcha() !!}

// outputs...

```

You can also pass in HTML attributes...

```
{!! recaptcha(['id' => 'myrecaptcha']) !!}

```

...or any of [reCAPTCHA's available options](https://developers.google.com/recaptcha/docs/display#render_param):

```
{!! recaptcha(['theme' => 'dark']) !!}

{!! recaptcha(['data-theme' => 'dark']) !!} // same thing

```

If you need to render the `` and `` tags for the reCAPTCHA widget separately, you can use the `recaptch_script()` and `recaptcha_widget()` functions:

```
{!! recaptcha_script() !!}

// ...

{!! recaptcha_widget() !!}

```

Need to support users without JavaScript? You can also insert a `` fallback:

```
{!! recaptcha() !!}
{!! recaptcha_noscript() !!}

```

Or, if you don't want to use any of those helper functions, you can use `recaptcha_site_key()` to grab the site key for your own custom markup:

```

```

Finally, if you have [LaravelCollective Html](http://laravelcollective.com/docs/5.1/html) installed, all helper functions can also be accessed through the `Form` facade:

```
{!! Form::recaptcha() !!}

```

### Validating reCAPTCHA responses

[](#validating-recaptcha-responses)

The simplest way to validate a reCAPTCHA field is by using the added `recaptcha` validation rule:

```
// in a controller...
$this->validate($request, [
    'g-recaptcha-response' => 'required|recaptcha'
]);

// in a form request...
public function rules()
{
    return [
        'g-recaptcha-response' => 'required|recaptcha'
    ];
}

```

Or, you can access the service directly to do manual validation:

```
if (app('recaptcha')->verify($request->input('g-recaptcha-response'))) {
    // user passed reCAPTCHA
}
else {
    // user failed reCAPTCHA
}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~38 days

Recently: every ~61 days

Total

8

Last Release

3671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83774878d65ee9193fd5acc90f82ff22a9054b342230d781604770212dfe5c03?d=identicon)[bicknoyle](/maintainers/bicknoyle)

---

Top Contributors

[![bicknoyle](https://avatars.githubusercontent.com/u/1166072?v=4)](https://github.com/bicknoyle "bicknoyle (55 commits)")

---

Tags

laravelrecaptcha

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[anhskohbo/no-captcha

No CAPTCHA reCAPTCHA For Laravel.

1.8k9.0M34](/packages/anhskohbo-no-captcha)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

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

Google captcha for Laravel

2101.1M2](/packages/buzz-laravel-google-captcha)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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