CAPTCHA Support in Filament!
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.
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.
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:
Provider | Composer Package | Install Instructions |
---|---|---|
{m’e} Web Studio Captcha | composer require mews/captcha |
Installation |
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 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'),
]),
]);
}
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.