PHPackages                             ghorbani/filament-arcaptcha-field - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ghorbani/filament-arcaptcha-field

ActiveLibrary[Templating &amp; Views](/categories/templating)

ghorbani/filament-arcaptcha-field
=================================

Provides an ArCaptcha field for Filament Forms (V2-V3-V4), works in Admin-Panel and Frontend-Forms.

1.0.1(5mo ago)17MITPHPPHP ^8.1

Since Dec 11Pushed 5mo agoCompare

[ Source](https://github.com/miladghorbani1999/filament-arcaptcha-field)[ Packagist](https://packagist.org/packages/ghorbani/filament-arcaptcha-field)[ Docs](https://github.com/milad/filament-arcaptcha-field)[ RSS](/packages/ghorbani-filament-arcaptcha-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Filament ArCaptcha Field
========================

[](#filament-arcaptcha-field)

Provides an ArCaptcha field for Filament Forms (V2-V3-V4), works in Admin-Panel and Frontend-Forms.

[![Latest Version on Packagist](https://camo.githubusercontent.com/bce41059d86a89c4e2cd74bf6f3dff37b9a040c7de259ef0e306d399dbfeea73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67686f7262616e692f66696c616d656e742d6172636170746368612d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ghorbani/filament-arcaptcha-field)[![Total Downloads](https://camo.githubusercontent.com/f705264b037ecb7b767eb4a1890bb12a2535eb50e29d45c2e53a9c632a8f9262/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f7262616e692f66696c616d656e742d6172636170746368612d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ghorbani/filament-arcaptcha-field)

This plugin is built on top of [arcaptcha/arcaptcha-php](https://github.com/arcaptcha/arcaptcha-php) package.

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

[](#installation)

You can install the package via composer:

```
composer require ghorbani/filament-arcaptcha-field
```

### Configuration

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="Ghorbani\FilamentArCaptchaField\FilamentArCaptchaFieldServiceProvider" --tag="config"
```

Add `ARCAPTCHA_SECRET_KEY` and `ARCAPTCHA_SITE_KEY` in your `.env` file:

```
ARCAPTCHA_SITE_KEY=your-site-key
ARCAPTCHA_SECRET_KEY=your-secret-key
```

You can obtain these keys from [ArCaptcha Dashboard](https://arcaptcha.ir/dashboard).

Usage
-----

[](#usage)

### In Admin Panel

[](#in-admin-panel)

```
use Ghorbani\FilamentArCaptchaField\Forms\Components\ArCaptcha;

public static function form(Form $form): Form
{
    return $form->schema([
        // ... other fields
        ArCaptcha::make('captcha')
            ->required(),
    ]);
}
```

### In Frontend Forms

[](#in-frontend-forms)

```
use Ghorbani\FilamentArCaptchaField\Forms\Components\ArCaptcha;

public $captcha = ''; // must be initialized

protected function getFormSchema(): array
{
    return [
        // ... other fields
        ArCaptcha::make('captcha')
            ->required(),
    ];
}
```

### Custom Options

[](#custom-options)

You can pass custom options to the ArCaptcha widget:

```
ArCaptcha::make('captcha')
    ->options([
        'lang' => 'en',
        'theme' => 'dark',
    ])
```

### Custom Site Key and Secret Key

[](#custom-site-key-and-secret-key)

You can override the default site key and secret key:

```
ArCaptcha::make('captcha')
    ->siteKey('your-custom-site-key')
    ->secretKey('your-custom-secret-key')
```

### Verification

[](#verification)

#### Using Validation Rule

[](#using-validation-rule)

You can use the `ArCaptchaRule` for automatic validation:

```
use Ghorbani\FilamentArCaptchaField\Rules\ArCaptchaRule;

// In your form rules
protected function getFormValidationRules(): array
{
    return [
        'captcha' => ['required', new ArCaptchaRule()],
    ];
}
```

Or in a Livewire component:

```
use Ghorbani\FilamentArCaptchaField\Rules\ArCaptchaRule;

public function submit()
{
    $this->validate([
        'captcha' => ['required', new ArCaptchaRule()],
    ]);

    // Process form submission
}
```

#### Manual Verification

[](#manual-verification)

To verify the ArCaptcha response manually:

```
use Ghorbani\FilamentArCaptchaField\Forms\Components\ArCaptcha;

$arcaptcha = ArCaptcha::make('captcha');

if ($arcaptcha->verify($data['captcha'])) {
    // Captcha is valid
} else {
    // Captcha is invalid
    throw new \Exception('Invalid captcha');
}
```

Or in a Livewire component:

```
use Ghorbani\FilamentArCaptchaField\Forms\Components\ArCaptcha;

public function submit()
{
    $this->validate();

    $arcaptcha = ArCaptcha::make('captcha');

    if (!$arcaptcha->verify($this->captcha)) {
        $this->addError('captcha', 'Invalid captcha. Please try again.');
        return;
    }

    // Process form submission
}
```

Configuration Options
---------------------

[](#configuration-options)

The configuration file allows you to set default options:

```
return [
    'site_key' => env('ARCAPTCHA_SITE_KEY', ''),
    'secret_key' => env('ARCAPTCHA_SECRET_KEY', ''),
    'options' => [
        'lang' => 'fa', // Language: 'fa' or 'en'
        'theme' => 'light', // Theme: 'light' or 'dark'
    ],
];
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 9.0+ or 10.0+ or 11.0+
- Filament 2.0+ or 3.0+ or 4.0+

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover any security related issues, please create an issue.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Credits
-------

[](#credits)

- [ArCaptcha PHP Library](https://github.com/arcaptcha/arcaptcha-php)
- [Filament](https://filamentphp.com/)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance73

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

150d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4568ed3200d67b43b61116babbded73353b09bf9f403b5c600293ba29ee2b843?d=identicon)[miladghorbani1999](/maintainers/miladghorbani1999)

---

Top Contributors

[![miladghorbani1999](https://avatars.githubusercontent.com/u/80102956?v=4)](https://github.com/miladghorbani1999 "miladghorbani1999 (20 commits)")

---

Tags

laravelcaptchaformfilamentarcaptcha

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ghorbani-filament-arcaptcha-field/health.svg)

```
[![Health](https://phpackages.com/badges/ghorbani-filament-arcaptcha-field/health.svg)](https://phpackages.com/packages/ghorbani-filament-arcaptcha-field)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[andreia/filament-nord-theme

A minimalist Arctic Nord theme for FilamentPHP

13334.7k2](/packages/andreia-filament-nord-theme)[laravie/html

HTML and Form Builders for the Laravel Framework

36184.6k4](/packages/laravie-html)[filafly/brisk

A simple, friendly theme for Filament.

2211.9k1](/packages/filafly-brisk)[webup/laravel-form

A Laravel package to help build forms.

147.2k1](/packages/webup-laravel-form)[cornford/bootstrapper

An easy way to intergrate Twitter Bootstrap with Laravel.

252.7k](/packages/cornford-bootstrapper)

PHPackages © 2026

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