PHP code example of xstreamka / yii2-recaptcha-widget

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

    

xstreamka / yii2-recaptcha-widget example snippets


'components' => [
    ...
    'reCaptcha' => [
        'class' => 'xstreamka\recaptcha\ReCaptchaConfig',
        'siteKeyV3' => 'your siteKey v3',
        'secretV3' => 'your secret key v3',
    ],
    ...
]

 $form = ActiveForm::begin(); 

<?= \xstreamka\recaptcha\ReCaptcha::validate(); 

$model = new QuestionForm();
if ($model->load(Yii::$app->request->post()) && $model->validate() && \xstreamka\recaptcha\ReCaptcha::validate()) {
...
}

php composer.phar