RecaptchaBundle
Installation
composer require keized/recaptcha-bundle
Register the bundle
// config/bundles.php
KeiZed\RecaptchaBundle\RecaptchaBundle::class => ['all' => true]
Add this javascript into your template
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
Add configuration
// config/packages/recaptcha.yaml
recaptcha:
key: <key>
secret: <secret>
How to use
In FormType
$builder->add('captcha', RecaptchaSubmitType::class)