PHPackages                             unodepiera/simplecaptcha - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. unodepiera/simplecaptcha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

unodepiera/simplecaptcha
========================

simplecaptcha package for laravel 4

0118[2 issues](https://github.com/uno-de-piera/simplecaptcha/issues)PHP

Since Dec 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/uno-de-piera/simplecaptcha)[ Packagist](https://packagist.org/packages/unodepiera/simplecaptcha)[ RSS](/packages/unodepiera-simplecaptcha/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Captcha for Laravel 4
----------------------------

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

\##Installation

```
{
	"require": {
	    "laravel/framework": "4.0.*",
	    "unodepiera/simplecaptcha": "dev-master"
	},
	"minimum-stability": "dev"
}
```

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

Usage
-----

[](#usage)

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

```
	'providers' => array(
        //...
        'Unodepiera\Simplecaptcha\SimplecaptchaServiceProvider',
    )
```

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

```
	'aliases' => array(
        //...
        'Simplecaptcha'  => 'Unodepiera\Simplecaptcha\Facades\Simplecaptcha',
    )
```

Publish assets with this command.

`$ php artisan asset:publish unodepiera/simplecaptcha`

Options captcha
---------------

[](#options-captcha)

You can set the following options for the captcha.

```
	$defaultOptions = array(
		"font"			=>	"PT_Sans-Web-Regular.ttf",
		"width" 		=> 	250,
		"height" 		=> 	140,
		"font_size" 	=> 	25,
		"length" 		=> 	6,
		"num_lines" 	=> 	"",
		"num_circles" 	=> 	"",
		"text"			=>	"",
		"expiration"	=>	600,
		"directory"		=>	"packages/unodepiera/simplecaptcha/captcha/",
		"dir_fonts"		=>	"packages/unodepiera/simplecaptcha/fonts/",
		"type"			=>	"alpha",
		"bg_color"		=>	"181,181,181",
		"border_color"	=>	"0,0,0"
	);
```

- Font: type font for captcha, view folder public/fonts.
- Num\_lines: number lines you would for captcha.
- Num\_circles: number circles you would for captcha.
- Expiration: number of seconds it will take to be removed captchas.
- Directory: folder on save captchas.
- Dir\_fonts: directory on save the fonts.
- Type: alpha or alphanum.

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

[](#example-usage)

```
	Route::get("form", function()
	{

		$options = array(
			"width"			=>	280,
			"height" 		=> 	100,
			"font_size" 	=> 	28,
			"length" 		=> 	8,
			"num_circles" 	=> 	0,
			"num_lines" 	=> 	4,
			"expiration"	=>  600,
			"bg_color"		=>	"20,20,20"
		);

		$captcha = Simplecaptcha::captcha($options);
		return View::make("form", array("captcha" => $captcha));

	});
	Route::post("process", function()
	{
		$rules =  array('captcha' => array('required', 'captcha'));
	    $validator = Validator::make(Input::all(), $rules);
	    if($validator->fails())
	    {

	    	echo "fails";

	    }else{

	    	echo "success";

	    }
	});
```

Now you can use the captcha in the view as follows:

```

        {{ Form::open(array('url' => 'process')) }}

	            {{ $captcha["img"] }}

                {{ Form::label('captcha', 'Captcha') }}

                {{ Form::text('captcha') }}

                {{ Form::submit('Success') }}

            {{ Form::close() }}

```

Visit me
--------

[](#visit-me)

- [Visit me](http://uno-de-piera.com)
- [SimpleCaptcha on Packagist](https://packagist.org/packages/unodepiera/simplecaptcha)
- [License](http://www.opensource.org/licenses/mit-license.php)
- [Laravel website](http://laravel.com)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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/869a644a1fba01392533fea7c25eadde27caa339a7b6cd71e4e4ef18f2351f49?d=identicon)[unodepiera](/maintainers/unodepiera)

---

Top Contributors

[![israel981](https://avatars.githubusercontent.com/u/8269286?v=4)](https://github.com/israel981 "israel981 (12 commits)")

### Embed Badge

![Health badge](/badges/unodepiera-simplecaptcha/health.svg)

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

###  Alternatives

[yannisme/oxotheme

OXO Theme For Flarum

3810.6k](/packages/yannisme-oxotheme)

PHPackages © 2026

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