PHPackages                             mohsen/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mohsen/captcha

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

mohsen/captcha
==============

A simple captcha for laravel 4

v2.0.2(11y ago)125.2k2MITPHPPHP &gt;=5.3.0

Since Jul 13Pushed 10y ago2 watchersCompare

[ Source](https://github.com/m-jch/captcha)[ Packagist](https://packagist.org/packages/mohsen/captcha)[ RSS](/packages/mohsen-captcha/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

\#Captcha

> A simple captcha for laravel 4

Preview
-------

[](#preview)

[![Preview](https://camo.githubusercontent.com/0588957fac993dab0f96b7d394e42a168dba225e52c3ba73cc9045921d478fb8/687474703a2f2f617061726e65742e69722f77702d636f6e74656e742f75706c6f6164732f323031342f30342f636170746368612e706e67)](https://camo.githubusercontent.com/0588957fac993dab0f96b7d394e42a168dba225e52c3ba73cc9045921d478fb8/687474703a2f2f617061726e65742e69722f77702d636f6e74656e742f75706c6f6164732f323031342f30342f636170746368612e706e67)

\##How to setup

update `composer.json` file:

```
{
    "require": {
        "laravel/framework": "4.1.*",
        "mohsen/captcha": "dev-master"
    }
}
```

and run `composer update` from terminal to download files.

update `app.php` file in `app/config` directory:

```
'providers' => array(
  ...
  'Mohsen\Captcha\CaptchaServiceProvider',
  ...
),
...
'aliases' => array(
  ...
  'Captcha'		  => 'Mohsen\Captcha\Captcha',
  ...
),
```

\##How to use

in your HTML form add following code:

```

```

and for validate user entered data just add `captcha` to array validation rules.

```
$rules = array(
  'user-captcha' => 'required|captcha'
);

$validator = Validator::make(Input::all(), $rules);

if($validator -> fails()) {
  return Redirect::back() -> withErrors($validator);
}
```

### Captcha::getImage() parameters

[](#captchagetimage-parameters)

All parameters are optional.

```

```

`$count`: Number of characters \[default=7\]

`$width`: Width of image \[default=160\]

`$height`: Height of image \[default=70\]

`$backgroundColor`: Background color of image \[default='efefef'\]

`$quality`: Quality of image \[default=50\]

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

4225d ago

Major Versions

v1.0 → v2.02014-09-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c043a72a1576f7a46a2bdf2cd58340156cd913e31f396f97e622a79dcf67482?d=identicon)[m-jch](/maintainers/m-jch)

---

Top Contributors

[![m-jch](https://avatars.githubusercontent.com/u/3691463?v=4)](https://github.com/m-jch "m-jch (17 commits)")

---

Tags

laravelcaptchaLaravel 4

### Embed Badge

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

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

PHPackages © 2026

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