dominion-solutions / filament-captcha
CAPTCHA Plugin for Filament
Fund package maintenance!
Open Collective
Installs: 1 615
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 5
Requires
- php: ^8.1
- filament/filament: ^3.2
- filament/forms: ^3.0
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
Suggests
- mews/captcha: Required for Mews Captcha support
- scyllaly/hcaptcha: Required for hCaptcha support
- scyllaly/recaptcha: Required for reCAPTCHA support
This package is auto-updated.
Last update: 2024-11-07 20:09:34 UTC
README
CAPTCHA Support in Filament!
What Is CAPTCHA?
CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. The goal of this package is to keep bots from being able to submit fake data on your forms. This should be the last (and not first) line of defense to keep bots from submitting garbage data to your unprotected forms.
Why do I need it?
If you're using a public panel within your application to collect data, for example a comment box, or a lead funnel, it can be (at best) annoying or (worst) a security liability for bots to try to be able to submit data to a form.
Installation
You can install the package via composer:
composer require dominion-solutions/filament-captcha
You will also need a Captcha Provider. Filament Captcha supports the following providers:
You can publish the config file with:
php artisan vendor:publish --tag="filament-captcha-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="filament-captcha-views"
This is the contents of the published config file:
return [ 'engine' => env('CAPTCHA_ENGINE', 'mews'), ];
Usage
Usage with mews/captcha
public function form(Form $form): Form { return $form->schema([ Captcha::make('captcha') ->rules(['captcha']) ->required() ->validationMessages([ 'captcha' => __('Captcha does not match the image'), ]), ]); }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.