PHP code example of mdoutreluingne / recaptcha-bundle

1. Go to this page and download the library: Download mdoutreluingne/recaptcha-bundle 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/ */

    

mdoutreluingne / recaptcha-bundle example snippets


// src/Form/UnknownType.php

use mdoutreluingne\RecaptchaBundle\Type\RecaptchaSubmitType;
// ...

class UnknownType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            // ...
            ->add('captcha', RecaptchaSubmitType::class, [
                'label' => 'Submit',
                'attr' => [
                    'class' => 'btn btn-primary'
                ]
            ])
        ;
    }
    
    // ...
}