Turnstile::__construct
Set the Turnstile secret key
Description
public Turnstile::__construct( string $secret )
Arguments
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $secret | string | Turnstile secret key. Read it from site/config/env.php with feggEnv('FEGG_TURNSTILE_SECRET') |
Example
Controller
use Fegg\Captcha\Turnstile;
$turnstile = new Turnstile(feggEnv('FEGG_TURNSTILE_SECRET', ''));