PHPackages                             andreibu/laravel\_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. andreibu/laravel\_captcha

ActivePackage

andreibu/laravel\_captcha
=========================

CAPTCHA For Laravel.

1.6.6(9y ago)1112MITPHPPHP &gt;=5.3.23

Since Feb 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AndreiBu/laravel_captcha)[ Packagist](https://packagist.org/packages/andreibu/laravel_captcha)[ RSS](/packages/andreibu-laravel-captcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (14)Used By (0)

CAPTCHA
=======

[](#captcha)

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

[](#installation)

```
composer require andreibu/laravel_captcha

```

Laravel 5
---------

[](#laravel-5)

### Setup

[](#setup)

Add ServiceProvider to the providers array in `config/app.php`.

```

   'providers' => [
    ...
	AndreiBu\laravel_captcha\CaptchaServiceProvider::class,

	],

   'aliases' => [
    ...

	'Captcha' => AndreiBu\laravel_captcha\Facades\Captcha::class,
	],

```

Add Route to reload captcha `routes/web.php`.

```
    Route::get('/captcha/{key?}', function($key='') {
        $json=array('img'=>Captcha::img($key),'key'=>Captcha::md5());
        return json_encode($json);
    });

```

### Configuration

[](#configuration)

you must copy in `/public/fonts/` ttf font and specify its path in the configuration `CAPTCHA_FONT`

(optional) Add key in .env file (without brackets):

```
    CAPTCHA_MIN=[0-999 999 999]
    CAPTCHA_MAX=[0-999 999 999]
    CAPTCHA_WIDTH=[0-1000]
    CAPTCHA_HEIGHT=[0-1000]
    CAPTCHA_TIME=[60-3600]
    CAPTCHA_GARBAGE=[0-100]
    CAPTCHA_REDRAW=[1-10]
    CAPTCHA_FONT='/fonts/times.ttf'

```

### Usage

[](#usage)

##### create CAPTCHA cod

[](#create-captcha-cod)

```
          {!! Captcha::create_cod(); !!}
          or
          {!! app('captcha')->create_cod(); !!}

```

##### display CAPTCHA

[](#display-captcha)

```
        {!! Captcha::create_cod(); !!}

		{!! Captcha::img(); !!}

```

##### display CAPTCHA + reload

[](#display-captcha--reload)

```

                                @if ($errors->has('captcha_cod'))

                                        {{ $errors->first('captcha_cod') }}

                                @endif
                     		{!! Captcha::create_cod(); !!}

                            {!! Captcha::img(); !!}
                            reload

                            function captcha_redraw(key){
                                var key=$('.pwd_reset_captcha input[name=captcha_md5]').val();
                                $.get('/captcha/'+key,'', function (data){
                                    try{
                                       var json=JSON.parse(data);
                                       $('.pwd_reset_captcha img.captcha').replaceWith(json.img);
                                       if(json.key!=''){$('.pwd_reset_captcha input[name=captcha_md5]').val(json.key);}
                                    }
                                    catch(e){console.log(e);}
                                });
                            }

```

##### Validation

[](#validation)

Add `'captcha_cod' => 'required|captcha'` to rules array.

```
$validate = Validator::make(Input::all(), [
	'captcha_cod' => 'required|captcha'
]);

```

Contribute
----------

[](#contribute)

[https://github.com/AndreiBu/laravel\_captcha/pulls](https://github.com/AndreiBu/laravel_captcha/pulls)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

12

Last Release

3356d ago

Major Versions

0.2 → 1.22017-02-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/59d8e31ac05257e18d41a0e3cb0f77c5984ed32a06a63b419dc3269787482dc8?d=identicon)[AndreiBu](/maintainers/AndreiBu)

---

Top Contributors

[![AndreiBu](https://avatars.githubusercontent.com/u/16398626?v=4)](https://github.com/AndreiBu "AndreiBu (1 commits)")

---

Tags

laravelcaptchalaravel5

### Embed Badge

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

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

###  Alternatives

[anhskohbo/no-captcha

No CAPTCHA reCAPTCHA For Laravel.

1.8k8.5M33](/packages/anhskohbo-no-captcha)

PHPackages © 2026

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