PHP code example of rafalmasiarek / dashboard-kit-addon-recaptcha

1. Go to this page and download the library: Download rafalmasiarek/dashboard-kit-addon-recaptcha 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/ */

    

rafalmasiarek / dashboard-kit-addon-recaptcha example snippets


$dashboard = Dashboard::create(__DIR__ . '/../', [
    'recaptcha' => [
        'site_key'   => $_ENV['RECAPTCHA_SITE_KEY'],
        'secret_key' => $_ENV['RECAPTCHA_SECRET_KEY'],
        'login'      => ['mode' => 'x_failed', 'threshold' => 3],
        'register'   => true,
    ],
]);

RecaptchaAddon::register($dashboard->getApp(), $dashboard->getContainer());

RecaptchaAddon::register($dashboard->getApp(), $dashboard->getContainer(), [
    'site_key'   => 'your-site-key',
    'secret_key' => 'your-secret-key',
    'login'      => ['mode' => 'x_failed', 'threshold' => 3],
    'register'   => true,
]);

'login' => ['mode' => 'always'],

'login' => ['mode' => 'x_failed', 'threshold' => 3],