abanoubnassem / filament-grecaptcha-field
Provides a Google reCaptcha V2 field for the Filament Forms
Installs: 44 835
Dependents: 3
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 7
Open Issues: 2
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- anhskohbo/no-captcha: ^3.4
- filament/forms: ^2.16|^3.0-stable|^3.2.51
- illuminate/contracts: ^9.0|^10.0|^11.0
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpunit/phpunit: ^9.5
README
Provides a Google reCaptcha V2 field for the Filament Forms(V2-V3), works in Admin-Panel
and Forntend-Forms
.
This plugin is built on top of anhskohbo/no-captcha package.
Installation
You can install the package via composer:
composer require abanoubnassem/filament-grecaptcha-field
Since the package depends on anhskohbo/no-captcha package. You may publish the configuration by running:
php artisan vendor:publish --provider="Anhskohbo\NoCaptcha\NoCaptchaServiceProvider"
Configuration
Add NOCAPTCHA_SECRET
and NOCAPTCHA_SITEKEY
in .env file :
NOCAPTCHA_SECRET=secret-key
NOCAPTCHA_SITEKEY=site-key
(You can obtain them from here)
Usage
use AbanoubNassem\FilamentGRecaptchaField\Forms\Components\GRecaptcha; // admin panel public static function form(Form $form): Form { return $form->schema([ ... GRecaptcha::make('captcha') ]); } //forntend-forms public $captcha = ''; // must be initialized protected function getFormSchema(): array { return [ .... GRecaptcha::make('captcha') ]; }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover any security related issues, please create an issue.
License
The MIT License (MIT). Please see License File for more information.