Download the PHP package sudiptpa/filament-turnstile without Composer

On this page you can find all versions of the php package sudiptpa/filament-turnstile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-turnstile

Filament Turnstile

CI Latest Version on Packagist PHP Version Downloads

A Cloudflare Turnstile integration built for Filament v5 and plain Laravel. Drop TurnstileInput into any Filament form schema, protect the admin login with one line, or use the standalone validation rule and Blade component in any Laravel controller, form request, or view. No CAPTCHA, no image puzzles, just a silent, privacy-respecting bot challenge.


Supported Versions

Dependency Version
PHP 8.2, 8.3, 8.4, 8.5
Laravel ^12.0, ^13.0
Filament ^5.0 (optional)

Filament is only required when using TurnstileInput or the bundled Login page. The validation rule and Blade component work in any Laravel application.


Installation

The service provider is registered automatically via Laravel package auto-discovery.

Publish the config file:

Add your Cloudflare Turnstile keys to .env:

Register your domain and get free API keys at dash.cloudflare.com → Turnstile.


Usage

1. Any Filament Form

Add TurnstileInput to any Filament schema like any other field. The widget renders automatically, the token is validated server-side on submit, and nothing is persisted to your model.

The field automatically hides itself when credentials are not configured, so local development without keys works out of the box.


2. Filament Admin Login

Swap the default Filament login page with the bundled one in your panel provider:

The login page renders the Turnstile widget when credentials are present and skips it when they are not. No conditional logic required in your application.


3. Plain Laravel: Blade Component

Use the <x-turnstile /> component in any Blade template. The component accepts optional theme, size, and any additional HTML attributes.

Cloudflare automatically injects a hidden cf-turnstile-response field on challenge completion.

Available props:

Prop Default Options
theme auto light, dark, auto
size normal normal, compact

4. Plain Laravel: Form Requests


5. Plain Laravel: Controllers

The TurnstileRule resolves its HTTP client from the service container automatically. You can also pass a client explicitly when needed (e.g. in tests):


Custom Key Resolver

By default, credentials are read from config/filament-turnstile.php. If your application resolves keys differently, for example from a database, per-tenant settings, or a secrets manager, implement TurnstileKeyResolverContract and bind it in your AppServiceProvider:

Return null to indicate that credentials are unavailable. The widget will be suppressed and validation skipped automatically. TurnstileInput, the Login page, TurnstileRule, and <x-turnstile /> all resolve credentials through this single contract.


Configuration Reference


Testing Locally

Cloudflare provides official test keys that work on any domain, including localhost, without registration:

Purpose Site key Secret key
Always passes 1x00000000000000000000AA 1x0000000000000000000000000000000AA
Always blocks 2x00000000000000000000AB 2x0000000000000000000000000000000AA
Forces interactive 3x00000000000000000000FF 3x0000000000000000000000000000000AA

Add these to your .env.testing or declare them in phpunit.xml:


Customising the Views

Publish the package views to override the widget HTML:

Views are published to resources/views/vendor/filament-turnstile/.


Running Package Tests


Changelog

See CHANGELOG.md.


License

MIT, see LICENSE.


All versions of filament-turnstile with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2,<8.6
filament/forms Version ^5.0
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sudiptpa/filament-turnstile contains the following files

Loading the files please wait ...