PHP code example of romanzipp / laravel-turnstile
1. Go to this page and download the library: Download romanzipp/laravel-turnstile 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/ */
romanzipp / laravel-turnstile example snippets
use romanzipp\Turnstile\Rules\TurnstileCaptcha;
$payload = $request->validate([
'cf-turnstile-response' => ['
use romanzipp\Turnstile\Validator;
$validator = new Validator();
$response = $validator->validate('input-token');
if ($response->isValid()) {
return true;
}
echo $response->getMessage();
php artisan vendor:publish --provider="romanzipp\Turnstile\Providers\TurnstileServiceProvider"