PHPackages                             thytanium/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. thytanium/captcha

Abandoned → [mews/captcha](/?search=mews%2Fcaptcha)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

thytanium/captcha
=================

Awesome Captcha for Laravel

v2.0(11y ago)3860↓33.3%1MITPHPPHP &gt;=5.4.0

Since Mar 13Pushed 11y ago2 watchersCompare

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

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

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

[](#captcha-for-laravel)

[![Captcha](https://camo.githubusercontent.com/e19255036b470c286429cbdc12c88e375249e6fb079aef3b5f3959bef1ef264c/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f636170746368612e706e67)](https://camo.githubusercontent.com/e19255036b470c286429cbdc12c88e375249e6fb079aef3b5f3959bef1ef264c/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f636170746368612e706e67)

Install
-------

[](#install)

Edit your `composer.json` file

#### Laravel 4

[](#laravel-4)

```
"require": {
  ...
  "thytanium/captcha": "1.*"
}
```

#### Laravel 5

[](#laravel-5)

```
"require": {
  ...
  "thytanium/captcha": "2.*"
}
```

Run `composer update` to install the package. Then add the following to `app.php`

```
'providers' => array(
  ...
  'Thytanium\Captcha\CaptchaServiceProvider',
);
```

```
'aliases' => array(
  'Captcha' => 'Thytanium\Captcha\Facades\Captcha',
);
```

Then, you have to **publish the configuration file**.

```
php artisan vendor:publish --provider="Thytanium\Captcha\CaptchaServiceProvider"
```

Use
---

[](#use)

To use it just put this HTML code in your form next to a text input.

```

```

### Validate

[](#validate)

To validate the entered text into the input, put this in your validation rules:

```
$rules = [
  'text_input' => 'required|captcha'
];

Validator::make($rules, Input::all());
```

### Options

[](#options)

You can edit `config/captcha.php` configuration file to change behavior of captcha.

#### String length

[](#string-length)

By default, string length is 6 characters. You can change it to whatever length you want. Remember, you might have to change width also, is not auto-calculated.

```
'length' => 6
```

#### Width and height

[](#width-and-height)

By defaut, width and height are `200px` x `50px`. You can change it to any other size.

```
'width' => 200,
'height' => 50
```

#### Case sensitive

[](#case-sensitive)

By default case verification is enabled. Change it to `false` to disable it.

```
'case_sensitive' => true
```

#### Letters case

[](#letters-case)

If you want the captcha to show only upper letters, lower letters or mixed.

```
'case' => 'upper' //For upper case letters only
'case' => 'lower' //For lower case letters only
'case' => 'mixed' //For both upper and lower case
```

#### Show letters/numbers

[](#show-lettersnumbers)

If you want a captcha with letters only:

```
'letters' => true,
'numbers' => false
```

If you want a captcha with numbers only:

```
'letters' => false,
'numbers' => true
```

If you want a captcha with both letters and numbers:

```
'letters' => true,
'numbers' => true
```

#### Character angle

[](#character-angle)

By default, character angle is 15. This will generate an captcha with characters angle **between** 0 and 15 degrees. Change it to whatever you want. If you want the characters in "straight" way, just put this value to 0 (zero).

```
'angle' => 15
```

#### Separation

[](#separation)

This is separation between characters. Default is 30. **The higher the more separated**.

```
'separation' => 30,
```

#### Background grid

[](#background-grid)

By default, background shows 20 vertical lines and 5 horizontal lines (one every 10 pixels). You can show as many lines as you want.

```
'h_lines' => 5, //Horizontal lines
'v_lines' => 20 //Vertical lines
```

#### Colors

[](#colors)

Colors must be provided in RGB notation \[rrr,ggg,bbb\].

##### Background color

[](#background-color)

By default is 250,250,250 (almost white)

```
'background' => [250, 250, 250]
```

##### Line color

[](#line-color)

By default is 220,220,220 (very light gray)

```
'line_color' => [220, 220, 220]
```

##### Font colors

[](#font-colors)

This is an `array` of choices. You can add as many colors as you want and the characters will rendered is this colors randomly.

```
'colors' => [
    [0, 83, 160],
    [33, 125, 211],
    [30, 134, 232],
    [11, 72, 130],
    [13, 119, 219],
    [0, 102, 150],
    [51, 113, 142],
],
```

### Font

[](#font)

This package works with **TrueType (.ttf) fonts**.

Four font choices are already provided: `Prototype` (default), `Impact`, `BrianJames` and `Spinwerad`. All of them thanks to [1001freefonts](http://www.1001freefonts.com).

##### Prototype

[](#prototype)

```
'font' => 'Prototype' //Ignore .ttf extension
```

[![Prototype](https://camo.githubusercontent.com/9f7d1a8f02869519d2d8d6a8dd682d92bfc3a6be8142afb1aaa52b8f5ede1af3/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f50726f746f747970652e706e67)](https://camo.githubusercontent.com/9f7d1a8f02869519d2d8d6a8dd682d92bfc3a6be8142afb1aaa52b8f5ede1af3/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f50726f746f747970652e706e67)

##### Impact

[](#impact)

```
'font' => 'Impact' //Ignore .ttf extension
```

[![Impact](https://camo.githubusercontent.com/0eae67b1c2a9aa8f9718ae07fde4ec2c1dcfbda82ce89e793256c4612142a833/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f496d706163742e706e67)](https://camo.githubusercontent.com/0eae67b1c2a9aa8f9718ae07fde4ec2c1dcfbda82ce89e793256c4612142a833/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f496d706163742e706e67)

##### BrianJames

[](#brianjames)

```
'font' => 'BrianJames' //Ignore .ttf extension
```

[![BrianJames](https://camo.githubusercontent.com/60c3ae9e9b8531a69c07589012f5f3375df2a3067b67f5a532e8b764a0ef162f/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f427269616e4a616d65732e706e67)](https://camo.githubusercontent.com/60c3ae9e9b8531a69c07589012f5f3375df2a3067b67f5a532e8b764a0ef162f/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f427269616e4a616d65732e706e67)

##### Spinwerad

[](#spinwerad)

```
'font' => 'Spinwerad' //Ignore .ttf extension
```

[![Spinwerad](https://camo.githubusercontent.com/289b085f775c19cd5eeeb6b16466fce9a6ad61872a52edf1250666086a9b8b17/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f5370696e77657261642e706e67)](https://camo.githubusercontent.com/289b085f775c19cd5eeeb6b16466fce9a6ad61872a52edf1250666086a9b8b17/687474703a2f2f74687974616e69756d2e696e666f2f6769746875622f435f5370696e77657261642e706e67)

#### Font size

[](#font-size)

By default, font size is `30px`. Change it to whatever you want.

```
'size' => 30
```

#### Image quality

[](#image-quality)

By default, and I recommend to keep it that way, image quality is 100.

```
'quality' => 100,
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

4070d ago

Major Versions

v1.0 → v2.02015-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ac4e3c75a8b6ccf804c6318180c4d8246f215852da188e2a050f1684fbe2d32?d=identicon)[thytanium](/maintainers/thytanium)

---

Top Contributors

[![aleaugustog](https://avatars.githubusercontent.com/u/1444898?v=4)](https://github.com/aleaugustog "aleaugustog (27 commits)")

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[stechstudio/laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel

126117.6k](/packages/stechstudio-laravel-jwt)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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