PHPackages                             oppara/cakephp-simple-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. oppara/cakephp-simple-recaptcha

ActiveCakephp-plugin[Authentication &amp; Authorization](/categories/authentication)

oppara/cakephp-simple-recaptcha
===============================

CakePHP plugin to handle Google Recaptcha V3

0.6.1(1y ago)140[2 issues](https://github.com/oppara/cakephp-simple-recaptcha/issues)MITPHPPHP &gt;=8.1

Since Sep 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/oppara/cakephp-simple-recaptcha)[ Packagist](https://packagist.org/packages/oppara/cakephp-simple-recaptcha)[ Docs](https://github.com/oppara/cakephp-simple-recaptcha)[ RSS](/packages/oppara-cakephp-simple-recaptcha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (19)Used By (0)

[![Build Status](https://camo.githubusercontent.com/621c32dc023b4f14bd1c72f80316ec802460c18f84c2f5e62f9813e59dfbe5b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f70706172612f63616b657068702d73696d706c652d7265636170746368612f63692e796d6c)](https://github.com/oppara/cakephp-simple-recaptcha/actions?query=workflow%3ACI+branch%3Amain)

CakePHP plugin to handle Google Recaptcha
=========================================

[](#cakephp-plugin-to-handle-google-recaptcha)

If both v2 and v3 are configured, it will act as v3 and use v2 as a fallback.
If only v3 is configured, it will act as v3.
And V2 so.

Requirements
------------

[](#requirements)

- PHP 8.1+
- CakePHP 5.0+

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

[](#installation)

```
composer require oppara/cakephp-simple-recaptcha

```

Load plugin
-----------

[](#load-plugin)

```
bin/cake plugin load Oppara/SimpleRecaptcha

```

Usage
-----

[](#usage)

### Use V3 with V2 fallback

[](#use-v3-with-v2-fallback)

Click to expand`config/app.php`

```
   'Recaptcha' => [
        'v3' => [
            'site_key' => 'your_site_key',
            'secret_key' => 'your_secret',
        ],
        'v2' => [
            'site_key' => 'your_site_key',
            'secret_key' => 'your_secret',
        ],
    ],

```

`src/Controller/InquiryController.php`

```
