PHPackages                             closca/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. closca/captcha

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

closca/captcha
==============

Captcha Package for Laravel 4

126PHP

Since Aug 7Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Captcha for Laravel 4
=====================

[](#captcha-for-laravel-4)

A simple [Laravel 4](http://four.laravel.com/) service provider for including the [Captcha for Laravel 4](https://github.com/mewebstudio/captcha).

Preview
-------

[](#preview)

[![Preview](https://camo.githubusercontent.com/d82ebc3307d2dee86766a9cc3b8d044546dc0bdd4ca3f722b3618f35191c379e/687474703a2f2f692e696d6775722e636f6d2f6b665859686c6b2e6a70673f31)](https://camo.githubusercontent.com/d82ebc3307d2dee86766a9cc3b8d044546dc0bdd4ca3f722b3618f35191c379e/687474703a2f2f692e696d6775722e636f6d2f6b665859686c6b2e6a70673f31)

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

[](#installation)

The Captcha Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `mews/captcha` package and setting the `minimum-stability` to `dev` (required for Laravel 4) in your project's `composer.json`.

```
{
    "require": {
        "laravel/framework": "4.1.*",
        "mews/captcha": "dev-master-l4"
    },
    "minimum-stability": "dev"
}
```

\###Updated Installation

The improvements of mauris's fork over mewebstudio are listed on the [pull request](https://github.com/mewebstudio/captcha/pull/14).

In order to use [mauris's](https://github.com/mauris/captcha) fork, the repository meeds to be added into the `composer.json` in the following manner:

```
{
    "require": {
        "laravel/framework": "4.1.*",
        "mews/captcha": "1.0.*"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/mauris/captcha"
        }
    ]
}
```

Update your packages with `composer update` or install with `composer install`.

In Windows, you'll need to include the GD2 DLL `php_gd2.dll` as an extension in php.ini.

Usage
-----

[](#usage)

To use the Captcha Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this.

Find the `providers` key in `app/config/app.php` and register the Captcha Service Provider.

```
    'providers' => array(
        // ...
        'Mews\Captcha\CaptchaServiceProvider',
    )
```

Find the `aliases` key in `app/config/app.php`.

```
    'aliases' => array(
        // ...
        'Captcha' => 'Mews\Captcha\Facades\Captcha',
    )
```

Configuration
-------------

[](#configuration)

To use your own settings, publish config.

`$ php artisan config:publish mews/captcha`

Example Usage
-------------

[](#example-usage)

```
    // [your site path]/app/routes.php

    Route::any('/captcha-test', function()
    {

        if (Request::getMethod() == 'POST')
        {
            $rules =  array('captcha' => array('required', 'captcha'));
            $validator = Validator::make(Input::all(), $rules);
            if ($validator->fails())
            {
                echo 'Incorrect!';
            }
            else
            {
                echo 'Matched :)';
            }
        }

        $content = Form::open(array(URL::to(Request::segment(1))));
        $content .= '' . HTML::image(Captcha::img(), 'Captcha image') . '';
        $content .= '' . Form::text('captcha') . '';
        $content .= '' . Form::submit('Check') . '';
        $content .= '' . Form::close() . '';
        return $content;

    });
```

^\_^

Links
-----

[](#links)

- [L4 Captcha on Github](https://github.com/mewebstudio/captcha)
- [L4 Captcha on Packagist](https://packagist.org/packages/mews/captcha)
- [For L3 on Github](https://github.com/mewebstudio/mecaptcha)
- [License](http://www.opensource.org/licenses/mit-license.php)
- [Laravel website](http://laravel.com)
- [Laravel Turkiye website](http://www.laravel.gen.tr)
- [MeWebStudio website](http://www.mewebstudio.com)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff5c36da118d171b6db2e1316974b06da49f47149cdc90ec20ba2dfcf656ec64?d=identicon)[closca](/maintainers/closca)

---

Top Contributors

[![closca](https://avatars.githubusercontent.com/u/4892901?v=4)](https://github.com/closca "closca (2 commits)")

### Embed Badge

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

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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