sfue / re-captcha-bundle
Google reCAPTCHA symfony form type and validator
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0
- google/recaptcha: ^1.1
- symfony/framework-bundle: ~3.2|~4.0
Requires (Dev)
- symfony/phpunit-bridge: ^4.0
- symfony/security-bundle: ^3.2 || ^4.0
This package is not auto-updated.
Last update: 2025-03-30 08:43:11 UTC
README
Installation
Install the bundle via composer
$ composer require sfue/re-captcha-bundle
Add the Bundle to your AppKernel
// app/AppKernel.php <?php public function registerBundles() { $bundles = array( // ... new new Sfue\ReCaptchaBundle\SfueReCaptchaBundle(), ); }
Add the bundles form theme to your twig configuration
sfue_re_captcha: site_key: 'your Google reCAPTCHA site key' secret: 'your Google reCAPTCHA secret'
Add the bundles form theme to your twig configuration
# Twig Configuration twig: form_themes: - '@SfueReCaptcha/Form/fields.html.twig'
Use the ReCaptchaType in any form you want to have a reCAPTCHA field
public function buildForm(FormBuilderInterface $builder, array $options) { $builder // ... ->add('recaptcha', ReCaptchaType::class) ; }