PHPackages                             erwane/cakephp-hcaptcha - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. erwane/cakephp-hcaptcha

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

erwane/cakephp-hcaptcha
=======================

HCaptcha plugin for CakePHP

2.1.0(1w ago)39981[1 PRs](https://github.com/Erwane/cakephp-hcaptcha/pulls)MITPHPPHP ^8.2CI failing

Since Apr 11Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Erwane/cakephp-hcaptcha)[ Packagist](https://packagist.org/packages/erwane/cakephp-hcaptcha)[ Fund](https://www.buymeacoffee.com/erwane)[ GitHub Sponsors](https://github.com/Erwane)[ RSS](/packages/erwane-cakephp-hcaptcha/feed)WikiDiscussions 2.x Synced today

READMEChangelogDependencies (9)Versions (12)Used By (0)

HCaptcha plugin for CakePHP
===========================

[](#hcaptcha-plugin-for-cakephp)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![codecov](https://camo.githubusercontent.com/e345b71038b5151cdb7b9136468bfda594d4f94bd256b9003f885f9fc9b8ab31/68747470733a2f2f636f6465636f762e696f2f67682f457277616e652f63616b657068702d68636170746368612f6272616e63682f322e782f67726170682f62616467652e7376673f746f6b656e3d4e4e5934464258434545)](https://codecov.io/gh/Erwane/cakephp-hcaptcha)[![Build Status](https://github.com/Erwane/cakephp-hcaptcha/actions/workflows/ci.yml/badge.svg?branch=2.x)](https://github.com/Erwane/cakephp-contact/actions)[![Packagist Downloads](https://camo.githubusercontent.com/e3af5895f5c6ddfd349bf6c7da9c7e7d1a8efdf028d672a6b6f704a4bd128ace/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f457277616e652f63616b657068702d6863617074636861)](https://packagist.org/packages/Erwane/cakephp-hcaptcha)[![Packagist Version](https://camo.githubusercontent.com/bdeebcaa75e21b7d398f0c16d9c11e41112328511eb06ca37b92aa262d8f4c09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f457277616e652f63616b657068702d6863617074636861)](https://packagist.org/packages/Erwane/cakephp-hcaptcha)

Version map
-----------

[](#version-map)

branchCakePHP corePHP min1.x^4.0PHP 7.22.x^5.0PHP 8.1Installation
------------

[](#installation)

```
composer require erwane/cakephp-hcaptcha
```

Load plugin in your `src/Application::bootstrap()`

```
    public function bootstrap(): void
    {
        $this->addPlugin('HCaptcha');
    }
```

Configuration
-------------

[](#configuration)

In your `config/app.php`, insert this default values:

```
    // If you use .env file:
    'HCaptcha' => [
        'key' => env('HCAPTCHA_KEY'),
        'secret' => env('HCAPTCHA_SECRET'),
    ],

    // If you use config/app_local.php
    'HCaptcha' => [
        'key' => null,
        'secret' => null,
    ],
```

HCaptcha key and secret can be found in your [HCaptcha dashboard](https://dashboard.hcaptcha.com/sites?page=1)

Usage
-----

[](#usage)

### In your templates

[](#in-your-templates)

Add the captcha to your form

```
