PHPackages                             rareloop/lumberjack-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. [Security](/categories/security)
4. /
5. rareloop/lumberjack-recaptcha

ActiveLibrary[Security](/categories/security)

rareloop/lumberjack-recaptcha
=============================

v1.0.3(1mo ago)112.0k↑33.3%1PHPCI failing

Since Apr 6Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (18)Versions (6)Used By (0)

Lumberjack ReCAPTCHA
====================

[](#lumberjack-recaptcha)

This package provides a simple integration for ReCAPTCHA v2 with Lumberjack and the [`lumberjack-validation`](https://github.com/rareloop/lumberjack-validation) package.

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

[](#installation)

`composer require rareloop/lumberjack-recaptcha`

Once installed, register the Service Provider in config/app.php:

```
'providers' => [
    ...

    Rareloop\Lumberjack\Recaptcha\RecaptchaServiceProvider::class,

    ...
],
```

Copy the example `config/recaptcha.php` file to you theme directory.

Add your ReCAPTCHA credentials to your `.env` file:

```
GOOGLE_RECAPTCHA_KEY="ABC123"
GOOGLE_RECAPTCHA_SECRET="ABC123"

# Optional, if you need to specify the hostname directly
GOOGLE_RECAPTCHA_HOSTNAME="my-hostname.com"

```

Usage
-----

[](#usage)

Make sure you call the `recaptcha()` Twig function in the form that you wish to add support to:

```

    {{ recaptcha() }}
    Submit

```

And then add the validation to your Form class to ensure that it is checked:

```
