2017 © Pedro Peláez
 

cakephp-plugin recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

image

crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  • PHP
  • 3 Dependents
  • 4 Suggesters
  • 14 Forks
  • 1 Open issues
  • 15 Versions
  • 26 % Grown

The README.md

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Integrate Google Recaptcha v2 to your CakePHP project

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require crabstudio/recaptcha

Or add the following lines to your application's composer.json:, (*4)

"require": {
    "crabstudio/recaptcha"
}

followed by the command:, (*5)

composer update

Load plugin

From command line:, (*6)

bin/cake plugin load Recaptcha

Load Component and Configure

Override default configure from loadComponent:, (*7)

$this->loadComponent('Recaptcha.Recaptcha', [
    'enable' => true,     // true/false
    'sitekey' => 'your_site_key', //if you don't have, get one: https://www.google.com/recaptcha/intro/index.html
    'secret' => 'your_secret',
    'type' => 'image',  // image/audio
    'theme' => 'light', // light/dark
    'lang' => 'vi',      // default en
    'size' => 'normal'  // normal/compact
]);

Usage

Display recaptcha in your view:, (*8)

    <?= $this->Form->create() ?>
    <?= $this->Form->control('email') ?>
    <?= $this->Recaptcha->display() ?>  // Display recaptcha box in your view, if configure enable = false, nothing to display here
    <?= $this->Form->submit() ?>
    <?= $this->Form->end() ?>

Verify in your controller function, (*9)

    public function forgotPassword() {
        if ($this->request->is('post')) {
            if ($this->Recaptcha->verify()) { // if configure enable = false, always return true
                //do something here
            }
            $this->Flash->error(__('Please pass Google Recaptcha first'));
        }
    }

Done, (*10)

The Versions

26/04 2018

dev-master

9999999-dev https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c agiletechvn

26/04 2018

2.1.0

2.1.0.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c agiletechvn

06/10 2017

2.0.5

2.0.5.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c agiletechvn

07/07 2017

2.0.4

2.0.4.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

06/07 2017

2.0.3

2.0.3.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

10/04 2017

2.0.2

2.0.2.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

11/12 2016

2.0.1

2.0.1.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

28/08 2016

2.0.0

2.0.0.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3.2+ projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

20/05 2016

1.0.6

1.0.6.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

20/05 2016

1.0.5

1.0.5.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

10/05 2016

1.0.4

1.0.4.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

03/05 2016

1.0.3

1.0.3.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

16/04 2016

1.0.2

1.0.2.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

14/04 2016

1.0.1

1.0.1.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c

08/12 2015

1.0.0

1.0.0.0 https://github.com/crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP 3 projects

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp bootstrap captcha google recaptcha crabstudio anhtuank7c