dev-master
9999999-devGoogle captcha handler for Cradle
MIT
The Requires
The Development Requires
by Christian Blanquera
cradle cradlephp
Google captcha handler for Cradle
Deprecation Notice: This project has been moved to https://github.com/CradlePHP/cradle-captcha, (*1)
Google Captcha Handling for Cradle, (*2)
You should be using CradlePHP currently at dev-master
. See
https://cradlephp.github.io/ for more information., (*3)
composer require cblanquera/cradle-captcha
Then in /bootstrap.php
, add, (*4)
->register('cblanquera/cradle-captcha')
Go to https://www.google.com/recaptcha/ and register for a token and secret., (*5)
Open /config/services.php
and add, (*6)
'captcha-main' => array( 'token' => '<Google Token>', 'secret' => '<Google Secret>' ),
Once the database is installed open up /public/index.php
and add the following., (*7)
<?php use Cradle\Framework\Flow; return cradle() //add routes here ->get('/captcha/test', 'Captcha Page') ->post('/captcha/test', 'Captcha Process') //add flows here //renders a table display ->flow('Captcha Page', Flow::captcha()->load, Flow::captcha()->render, 'TODO: form page' ) ->flow('Captcha Process', Flow::captcha()->check, array( Flow::captcha()->yes, 'TODO: process' ), array( Flow::captcha()->no, 'TODO: deny' ) );
Google captcha handler for Cradle
MIT
cradle cradlephp