PHPackages                             subbee/turnstile-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. subbee/turnstile-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

subbee/turnstile-validator
==========================

Laravel 5.4+ compatible Turnstile validator

00PHP

Since Apr 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/subbee/turnstile-validator)[ Packagist](https://packagist.org/packages/subbee/turnstile-validator)[ RSS](/packages/subbee-turnstile-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Subbee Turnstile Validator
==========================

[](#subbee-turnstile-validator)

[![Tests](https://github.com/subbee/turnstile-validator/actions/workflows/tests.yml/badge.svg)](https://github.com/subbee/turnstile-validator/actions)[![Latest Version on Packagist](https://camo.githubusercontent.com/90fe93d781ba1713056a49aab7338ff44010c6d62093848df10443ee157e5d28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7375626265652f7475726e7374696c652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subbee/turnstile-validator)[![License](https://camo.githubusercontent.com/9b2e11c85a8f580d21db27190980faadfc23294b60dca7138c301a57866f50d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7375626265652f7475726e7374696c652d76616c696461746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subbee/turnstile-validator)

A simple and flexible Laravel package to integrate [Cloudflare Turnstile](https://www.cloudflare.com/products/turnstile/) CAPTCHA validation into your applications.

---

Features
--------

[](#features)

- Easy Turnstile integration
- Validation rule for forms
- Blade directive for widget embedding
- Configurable via `.env`
- Laravel 5.x, 6.x, 7.x, 8.x, 9.x, 10.x compatible

---

Installation
------------

[](#installation)

```
composer require subbee/turnstile-validator
```

Publish configuration (optional):

```
php artisan vendor:publish --tag=config --provider="TurnstileValidator\TurnstileServiceProvider"
```

Add .env variables

```
TURNSTILE_SITEKEY=your-sitekey-here
TURNSTILE_SECRET=your-secret-key-here
```

Getting Cloudflare Turnstile keys
---------------------------------

[](#getting-cloudflare-turnstile-keys)

1. Go to Cloudflare Turnstile Dashboard.
2. Log in or create an account.
3. Navigate to Access &gt; Turnstile.
4. Click “Add Site”, set the domain and widget mode.
5. Copy your Site Key and Secret Key into .env.

Usage
-----

[](#usage)

### Validation

[](#validation)

```
$request->validate([
'cf-turnstile-response' => 'required|turnstile',
]);
```

### Blade directive

[](#blade-directive)

```

    @csrf
    @turnstile
    Submit

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3224e05e32df26c6abf6bc59092a24bad5f0f49e4130bc039800f8eae2842c91?d=identicon)[subbee](/maintainers/subbee)

---

Top Contributors

[![subbee](https://avatars.githubusercontent.com/u/10153045?v=4)](https://github.com/subbee "subbee (2 commits)")

### Embed Badge

![Health badge](/badges/subbee-turnstile-validator/health.svg)

```
[![Health](https://phpackages.com/badges/subbee-turnstile-validator/health.svg)](https://phpackages.com/packages/subbee-turnstile-validator)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
