PHP Laravel Package for Cloudflare’s Turnstile Captcha Service

Cloudflare is a global network designed to make everything you connect to the Internet secure, private, fast, and reliable.

I was looking to implement Cloudflare’s capture service, Turnstile, and began looking for a PHP Laravel package. There wasn’t one available, so I made a my own Laravel package to facilitate the server side validation of Cloudflare’s Turnstile captcha service. I hope you enjoy using it!

What is Turnstile?

Cloudflare's Turnstile Captcha Service

Cloudflare’s Turnstile is a free Captcha service that serves as an alternative to Google’s reCaptcha. Its purpose is to provide a secure, free, and safe way to mitigate spam on your website forms. They provide three different implementations:

  • Managed
    Cloudflare will use information from the visitor to decide if an interactive challenge should be used. If we do show an interaction, the user will be prompted to check a box (no images or text to decipher).
  • Non-interactive
    Cloudflare will use information from the visitor to decide if an interactive challenge should be used. If we do show an interaction, the user will be prompted to check a box (no images or text to decipher).
  • Invisible
    Invisible challenge that does not require interaction.

Getting setup is easy, just follow the guide on Cloudflare’s blog:

https://www.cloudflare.com/products/turnstile/

Where can I get the PHP Laravel Package?

Install Derek Codes’ Laravel package to easily provide the backend validation. Here’s a link to the GitHub repository:

https://github.com/derekcodes-io/turnstile-laravel

Share via
Copy link
Powered by Social Snap