PHP code example of thelia / re-captcha-module
1. Go to this page and download the library: Download thelia/re-captcha-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thelia / re-captcha-module example snippets
#[AsEventListener(event: TheliaEvents::FORM_AFTER_BUILD.‘.my_form’)]
final class ProtectMyForm
{
public function __invoke(TheliaFormEvent $event): void
{
ReCaptchaProtection::apply($event->getForm()->getFormBuilder());
}
}