Configuration

You can publish the config file with:

1php artisan vendor:publish --tag="turnstile-config"

This is the contents of the published config file:

1return [
2 /*
3 |--------------------------------------------------------------------------
4 | Turnstile Keys
5 |--------------------------------------------------------------------------
6 |
7 | This value is the site, and the secret key of your application, after creating an application
8 | with Cloudflare turnstile, copy the site key, and use it here, or in the .env
9 | file.
10 | Note that the secret key should not be publicly accessible.
11 |
12 | @see: https://developers.cloudflare.com/turnstile/get-started/#get-a-sitekey-and-secret-key
13 |
14 */
15 'turnstile_site_key' => env('TURNSTILE_SITE_KEY', null),
16 
17 'turnstile_secret_key' => env('TURNSTILE_SECRET_KEY', null),
18 
19 /*
20 |--------------------------------------------------------------------------
21 | Error Messages
22 |--------------------------------------------------------------------------
23 |
24 | Here you can find the error messages for the application. You can modify
25 | or translate the error message as you like.
26 |
27 | Note that you can translate the error message directly, without wrapping
28 | them in translate helper.
29 |
30 */
31 'error_messages' => [
32 'turnstile_check_message' => 'The CAPTCHA thinks you are a robot! Please refresh and try again.',
33 ],
34];

Optionally, you can publish the views using

1php artisan vendor:publish --tag="turnstile-views"

Turnstile Keys

To be able to use Cloudflare Turnstile, you need to get the SiteKey, and the SecretKey from your Cloudflare dashboard

After Generating the keys, use TURNSTILE_SITE_KEY, and TURNSTILE_SECRET_KEY in your .env file

1TURNSTILE_SITE_KEY=2x00000000000000000000AB
2TURNSTILE_SECRET_KEY=2x0000000000000000000000000000000AA

If you want to test the widget, you can use the Dummy site keys and secret keys that Cloudflare provides.

Join our newsletter

Subscribe to Our Newsletter and never miss our offers, latest news, Articles, etc.

We care about the protection of your data. Read our Privacy Policy.