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

ActivePackage[Security](/categories/security)

overlu/mini-captcha
===================

Mini Captcha Package

v1.1.3(4y ago)1311MITPHPPHP ^7.4

Since Oct 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/overlu/mini-captcha)[ Packagist](https://packagist.org/packages/overlu/mini-captcha)[ RSS](/packages/overlu-mini-captcha/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Captcha for Mini
================

[](#captcha-for-mini)

Preview
-------

[](#preview)

[![Preview](https://camo.githubusercontent.com/5796b984677c086025788097a4f9f89701595234cb98a23c7276c4ea5424c6ef/68747470733a2f2f696d6167652e6962622e636f2f6b5a784d4c6d2f696d6167652e706e67)](https://camo.githubusercontent.com/5796b984677c086025788097a4f9f89701595234cb98a23c7276c4ea5424c6ef/68747470733a2f2f696d6167652e6962622e636f2f6b5a784d4c6d2f696d6167652e706e67)

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

[](#installation)

Require this package with composer:

```
composer require overlu/mini-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` in php.ini. And you also need include `php_fileinfo.dll` and `php_mbstring.dll` to fit the requirements of `mews/captcha`'s dependencies.

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 `config/app.php` and register the Captcha Service Provider.

```
    'providers' => [
        // ...
        MiniCaptcha\CaptchaServiceProvider::class,
    ]
```

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

[](#configuration)

To use your own settings, publish config.

`$ php bin/artisan vendor:publish`

`config/captcha.php`

```
return [
    'default'   => [
        'length'    => 5,
        'width'     => 120,
        'height'    => 36,
        'quality'   => 90,
        'math'      => true,  //Enable Math Captcha
        'expire'    => 60,    //Stateless/API captcha expiration
    ],
    // ...
];
```

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

[](#example-usage)

### Session Mode:

[](#session-mode)

```
    // [your site path]/Http/routes.php
    Route::any('captcha-test', function() {
        if (request()->getMethod() == 'POST') {
            $rules = ['captcha' => 'required|captcha'];
            $validator = validator()->make(request()->all(), $rules);
            if ($validator->fails()) {
                echo 'Incorrect!';
            } else {
                echo 'Matched :)';
            }
        }

        $form = '';
        $form .= '';
        $form .= '' . captcha_img() . '';
        $form .= '';
        $form .= 'Check';
        $form .= '';
        return $form;
    });
```

### Stateless Mode:

[](#stateless-mode)

You get key and img from this url `http://localhost/captcha/api/math`and verify the captcha using this method:

```
    //key is the one that you got from json response
    // fix validator
    // $rules = ['captcha' => 'required|captcha_api:'. request('key')];
    $rules = ['captcha' => 'required|captcha_api:'. request('key') . ',math'];
    $validator = validator()->make(request()->all(), $rules);
    if ($validator->fails()) {
        return response()->json([
            'message' => 'invalid captcha',
        ]);

    } else {
        //do the job
    }
```

Return Image
============

[](#return-image)

```
captcha();
```

or

```
Captcha::create();
```

Return URL
==========

[](#return-url)

```
captcha_src();
```

or

```
Captcha::src('default');

```

Return HTML
===========

[](#return-html)

```
captcha_img();
```

or

```
Captcha::img();
```

To use different configurations
===============================

[](#to-use-different-configurations)

```
captcha_img('flat');

Captcha::img('inverse');
```

etc.

Based on [Intervention Image](https://github.com/Intervention/image)

^\_^

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~15 days

Total

7

Last Release

1611d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18390489?v=4)[lupeng](/maintainers/overlu)[@overlu](https://github.com/overlu)

---

Top Contributors

[![overlu](https://avatars.githubusercontent.com/u/18390489?v=4)](https://github.com/overlu "overlu (9 commits)")

---

Tags

securitycaptchaswoolemini

### Embed Badge

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

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

###  Alternatives

[gregwar/captcha-bundle

Captcha bundle

3524.8M33](/packages/gregwar-captcha-bundle)[s1syphos/php-simple-captcha

Simple captcha generator

2639.5k9](/packages/s1syphos-php-simple-captcha)[lorddashme/php-simple-captcha

A simple captcha package that fit to any type of web application built on php.

103.0k](/packages/lorddashme-php-simple-captcha)

PHPackages © 2026

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