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

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

daikazu/laravel-recaptcha
=========================

reCAPTCHA v2 and Invisible reCAPTCHA for laravel

v0.0.5(6y ago)0563MITPHPPHP &gt;=5.5.5

Since Mar 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/daikazu/laravel-recaptcha)[ Packagist](https://packagist.org/packages/daikazu/laravel-recaptcha)[ RSS](/packages/daikazu-laravel-recaptcha/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Laravel reCAPTCHA
=================

[](#laravel-recaptcha)

reCAPTCHA v2 and Invisible reCAPTCHA for Laravel
------------------------------------------------

[](#recaptcha-v2-and-invisible-recaptcha-for-laravel)

Easily add Google's V2 and Invisable reCaptcha to your forms;

This code is borrowed heavily from [anhskohbo/no-captcha](https://github.com/anhskohbo/no-captcha)

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

[](#installation)

```
composer require daikazu/laravel-recaptcha
```

Setup
-----

[](#setup)

*NOTE* This package supports Laravel 5.5 auto-discovery, so you can skip the setup if you are using 5.5 and above.

LARAVEL 5
---------

[](#laravel-5)

### Configuration

[](#configuration)

Public Config File `recaptcha.php`

```
php artisan vendor:publish --provider="Daikazu\LaravelRecaptcha\ReCaptchaServiceProvider"

```

Add your `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` into your `.env` file:

```
RECAPTCHA_SECRET=secret-key
RECAPTCHA_SITEKEY=site-key

```

(You can obtain them from [here](https://www.google.com/recaptcha/admin))

Usage
-----

[](#usage)

#### Initialize javascript source:

[](#initialize-javascript-source)

With default options :

```
 {!! ReCaptcha::renderJs() !!}
```

With [language support](https://developers.google.com/recaptcha/docs/language) or [onloadCallback](https://developers.google.com/recaptcha/docs/display#explicit_render) option :

```
 {!! ReCaptcha::renderJs('fr', true, 'recaptchaCallback') !!}
```

### Display reCAPTCHA V2

[](#display-recaptcha-v2)

```
{!! ReCaptcha::displayWidget() !!}
```

With [custom attributes](https://developers.google.com/recaptcha/docs/display#render_param) (theme, size, callback ...) :

```
{!! ReCaptcha::displayWidget(['data-theme' => 'dark']) !!}
```

### Display Invisible reCAPTCHA button

[](#display-invisible-recaptcha-button)

```
{!! ReCaptcha::displayButton( 'Button Text', ['data-callback' => 'onFormSubmit', 'class' => 'button is-info']) !!}
```

### Validation

[](#validation)

Add `'g-recaptcha-response' => 'required|recaptcha'` to to validation rules array;

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

Then check for reCAPTCHA errors in the form:

```
@if ($errors->has('g-recaptcha-response'))

        {{ $errors->first('g-recaptcha-response') }}

@endif
```

Testing
-------

[](#testing)

Comming soon!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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 ~144 days

Total

5

Last Release

2412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00a5aa701f964455918b2e454e7b460fe2ef729639337a059d5bac12e162027e?d=identicon)[daikazu](/maintainers/daikazu)

---

Top Contributors

[![daikazu](https://avatars.githubusercontent.com/u/4039367?v=4)](https://github.com/daikazu "daikazu (26 commits)")

---

Tags

laravelrecaptchacaptchaLaravel reCAPTCHA

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/daikazu-laravel-recaptcha/health.svg)](https://phpackages.com/packages/daikazu-laravel-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)[albertcht/invisible-recaptcha

Invisible reCAPTCHA For Laravel.

6031.6M6](/packages/albertcht-invisible-recaptcha)[buzz/laravel-google-captcha

Google captcha for Laravel

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

Different types of Captcha implementation for Laravel Application.

10715.9k](/packages/rahul900day-laravel-captcha)

PHPackages © 2026

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