PHPackages                             erfanwmb/captcha - 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. [Image &amp; Media](/categories/media)
4. /
5. erfanwmb/captcha

ActiveLibrary[Image &amp; Media](/categories/media)

erfanwmb/captcha
================

This package is for captcha

v1.2.2(4mo ago)162MITPHPPHP ^8.0

Since Dec 24Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/Erfanwmb47/captcha)[ Packagist](https://packagist.org/packages/erfanwmb/captcha)[ RSS](/packages/erfanwmb-captcha/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)DependenciesVersions (11)Used By (0)

Captcha for Laravel
-------------------

[](#captcha-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/dbfa2a5682c2ea60ddc1f1b4e001155eda45357cbf77f486872b56d59276adbd/687474703a2f2f706f7365722e707567782e6f72672f657266616e776d622f636170746368612f76)](https://packagist.org/packages/erfanwmb/captcha) [![Total Downloads](https://camo.githubusercontent.com/64e23bd58a682a36933c2f6098beb16db7491e1eb4a86ba8f7c922c3ea3dcada/687474703a2f2f706f7365722e707567782e6f72672f657266616e776d622f636170746368612f646f776e6c6f616473)](https://packagist.org/packages/erfanwmb/captcha) [![Latest Unstable Version](https://camo.githubusercontent.com/0793e319dbbbcefa26c48e69a41baf4b9c5457bdc9d009757f6f34bfa970e57f/687474703a2f2f706f7365722e707567782e6f72672f657266616e776d622f636170746368612f762f756e737461626c65)](https://packagist.org/packages/erfanwmb/captcha) [![License](https://camo.githubusercontent.com/2b8a8890b8d641eea48156391a15cd17ab831839683581a2a3d867348a610710/687474703a2f2f706f7365722e707567782e6f72672f657266616e776d622f636170746368612f6c6963656e7365)](https://packagist.org/packages/erfanwmb/captcha) [![PHP Version Require](https://camo.githubusercontent.com/76a4a2c9dfc9383e317728de659e30f41cea27cc0e6ca7b8f946c9e0a8a20bde/687474703a2f2f706f7365722e707567782e6f72672f657266616e776d622f636170746368612f726571756972652f706870)](https://packagist.org/packages/erfanwmb/captcha)

[![Captcha 1.0 Screenshot](https://camo.githubusercontent.com/87ff8e5fef50ef48ff0080524d9c6d3c5c500b5f745b1f08a17d2bdcb6771df5/68747470733a2f2f75706c6f61646b6f6e2e69722f75706c6f6164732f3631646632335f3233636170746368612e6a7067)](https://camo.githubusercontent.com/87ff8e5fef50ef48ff0080524d9c6d3c5c500b5f745b1f08a17d2bdcb6771df5/68747470733a2f2f75706c6f61646b6f6e2e69722f75706c6f6164732f3631646632335f3233636170746368612e6a7067)

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

[](#installation)

Require this package with composer. It is recommended to only require the package for development.

```
composer require erfanwmb/captcha
```

You can change `SECURITY_CAPTCHA` in `.env` to `gd` or `recaptcha` or `hcaptcha`

#### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

```
php artisan vendor:publish --provider="erfanwmb\captcha\CaptchaServiceProvider"
```

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
erfanwmb\captcha\CaptchaServiceProvider::class,
```

If you want to use the facade to log messages, add this to your facades in app.php:

```
'captcha'   => erfanwmb\captcha\CaptchaFacade::class
```

Usage
-----

[](#usage)

- set your recaptcha(google) `SECURITY_RECAPTCHA_SITE_KEY` and `SECURITY_RECAPTCHA_SECRET_KEY` for user recaptcha in config`.env`
- set your hcaptcha `SECURITY_RECAPTCHA_SITE_KEY` and `SECURITY_RECAPTCHA_SECRET_KEY` for user hcaptcha in config`.env`
- add flowing code to view to show captcha

```
@include('captcha.index')
```

### example

[](#example)

```
@include('captcha.index',['theme_captcha'=>'light','exclusive_captcha'=>'gd'])
```

you can use `exclusive_captcha` for customize captcha in views you can use `theme_captcha` for customize theme captcha in views

- use this to your request or validation

```
'g-recaptcha-response'=> [CaptchaFacade::validate($this->exclusive_captcha ?? null)]
```

#### warning

[](#warning)

you don't need to add `required` for validation `g-recaptcha-response`

Update
------

[](#update)

- for update, you can use following command for just update views

```
php artisan vendor:publish --provider="erfanwmb\captcha\CaptchaServiceProvider" --tag="view"
```

-and if you want to update captcha config you can use following command

### warning

[](#warning-1)

this command rewrite all captcha config so recaptcha and hcaptcha (site\_key &amp; secret\_key) delete

```
php artisan vendor:publish --provider="erfanwmb\captcha\CaptchaServiceProvider" --tag="config"
```

if you want to disable captcha temporally use following command

```
SECURITY_CAPTCHA=null
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance74

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~86 days

Recently: every ~192 days

Total

10

Last Release

146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53a22105429d9deeecea9b3a8d69c0fedb161da4437cab3231daf24d3497e6b3?d=identicon)[efanwmb](/maintainers/efanwmb)

---

Top Contributors

[![Erfanwmb47](https://avatars.githubusercontent.com/u/115082843?v=4)](https://github.com/Erfanwmb47 "Erfanwmb47 (53 commits)")

---

Tags

laravelgdrecaptchacaptchahcaptcha

### Embed Badge

![Health badge](/badges/erfanwmb-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/erfanwmb-captcha/health.svg)](https://phpackages.com/packages/erfanwmb-captcha)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M182](/packages/intervention-image-laravel)[nikkanetiya/laravel-color-palette

Laravel Wrapper for `ksubileau/color-thief-php`. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.

3312.7k](/packages/nikkanetiya-laravel-color-palette)

PHPackages © 2026

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