PHPackages                             jahanzaibbahadur/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. [Security](/categories/security)
4. /
5. jahanzaibbahadur/laravel-captcha

ActiveLibrary[Security](/categories/security)

jahanzaibbahadur/laravel-captcha
================================

Captcha Package for Laravel

1.4(8y ago)059MITPHPPHP &gt;=5.4.0

Since Apr 25Pushed 1y agoCompare

[ Source](https://github.com/jahanzaibbahadur/Captcha)[ Packagist](https://packagist.org/packages/jahanzaibbahadur/laravel-captcha)[ RSS](/packages/jahanzaibbahadur-laravel-captcha/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

For Laravel 4, please use the [1.1 branch](https://github.com/Latrell/Captcha/releases/tag/1.1)!

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

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

A simple [Laravel 5](http://laravel.com/) service provider for including the [Captcha for Laravel 5](https://github.com/Gregwar/Captcha).

This library is not maintained for 3rd party use.

Preview
-------

[](#preview)

[![Captchas examples](https://camo.githubusercontent.com/d2ec7ccc16dacc36732ff2c6bad51df1bad2428b/687474703a2f2f677265677761722e636f6d2f63617074636861732e706e67)](https://camo.githubusercontent.com/d2ec7ccc16dacc36732ff2c6bad51df1bad2428b/687474703a2f2f677265677761722e636f6d2f63617074636861732e706e67)

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

[](#installation)

```
composer require latrell/captcha dev-master

```

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 (only for Laravel 5.4 or below).

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

```
    'providers' => [
        // ...
        'Latrell\Captcha\CaptchaServiceProvider',
    ]
```

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

```
    'aliases' => [
        // ...
        'Captcha' => 'Latrell\Captcha\Facades\Captcha',
    ]
```

Custom error messages. Add key `captcha` to `resources/lang/[local]/validation.php`

```
return [
	// ...
	'captcha' => '图片验证码不正确。',
];
```

Then publish the config file with `php artisan vendor:publish`. This will add the file `config/latrell-captcha.php`. This config file is the primary way you interact with Captcha.

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

[](#example-usage)

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

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

        if (Request::getMethod() == 'POST')
        {
            $rules =  ['captcha' => '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::url()) . '';
        $content .= '' . Form::text('captcha') . '';
        $content .= '' . Form::submit('Check') . '';
        $content .= '' . Form::close() . '';
        return $content;

    });
```

Links
-----

[](#links)

- [L5 Captcha on Github](https://github.com/latrell/captcha)
- [L5 Captcha on Packagist](https://packagist.org/packages/Latrell/captcha)
- [Captcha for Gregwar](https://github.com/Gregwar/Captcha)
- [License](http://www.opensource.org/licenses/mit-license.php)
- [Laravel website](http://laravel.com)
- [MeWebStudio website](http://latrell.me)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 73% 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 ~248 days

Recently: every ~310 days

Total

6

Last Release

3159d ago

PHP version history (2 changes)1.0PHP &gt;=5.3.0

1.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/597cb868942655a244d949449d5afb837a2db51ed49207216f941506970d5028?d=identicon)[jahanzaibbahadur](/maintainers/jahanzaibbahadur)

---

Top Contributors

[![latrell](https://avatars.githubusercontent.com/u/6267962?v=4)](https://github.com/latrell "latrell (27 commits)")[![jahanzaibbahadur](https://avatars.githubusercontent.com/u/13366184?v=4)](https://github.com/jahanzaibbahadur "jahanzaibbahadur (10 commits)")

---

Tags

laravelsecuritycaptchalaravel 5l5captcha image

### Embed Badge

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

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

###  Alternatives

[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

8745.6k](/packages/dgtlss-warden)[ercsctt/laravel-file-encryption

Secure file encryption and decryption for Laravel applications

642.6k](/packages/ercsctt-laravel-file-encryption)

PHPackages © 2026

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