PHPackages                             antonamosov/laravel-math-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. antonamosov/laravel-math-captcha

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

antonamosov/laravel-math-captcha
================================

A simple math captcha for Laravel form validation with different operations.

1.1.1(7y ago)0611MITPHPPHP ^7.0

Since Apr 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/antonamosov/laravel-math-captcha)[ Packagist](https://packagist.org/packages/antonamosov/laravel-math-captcha)[ RSS](/packages/antonamosov-laravel-math-captcha/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (7)Used By (0)

Very simple math captcha for Laravel5
=====================================

[](#very-simple-math-captcha-for-laravel5)

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

[](#installation)

```
composer require antonamosov/laravel-math-captcha

```

### Setup Laravel &gt; 5.5

[](#setup-laravel--55)

This package supports Laravel Package Auto-Discovery.

### Setup Laravel &lt;= 5.4

[](#setup-laravel--54)

You can add the ServiceProvider to the providers array in `app/config/app.php`.

```
ElicDev\MathCaptcha\MathCaptchaServiceProvider::class,

```

### Usage

[](#usage)

This package only returns the question and the input. You have to position it within your labels and form classes.

```
{{ app('mathcaptcha')->label() }}
{!! app('mathcaptcha')->input() !!}
```

Display it wihtin Bootstrap as example:

```

    Please solve the following math function: {{ app('mathcaptcha')->label() }}
    {!! app('mathcaptcha')->input(['class' => 'form-control', 'id' => 'mathgroup']) !!}
    @if ($errors->has('mathcaptcha'))

            {{ $errors->first('mathcaptcha') }}

    @endif

```

Looks like

[![MathCaptcha Bootstrap](https://raw.githubusercontent.com/elic-dev/laravel-math-captcha/master/readme_bootstrap_sample.png)](https://raw.githubusercontent.com/elic-dev/laravel-math-captcha/master/readme_bootstrap_sample.png)

##### Validation

[](#validation)

Add `'mathcaptcha' => 'required|mathcaptcha'` to rules array.

```
$this->validate($request, [
    'mathcaptcha' => 'required|mathcaptcha',
]);
```

Add corresponding translation string to your `lang/validation.php` files.

##### Reset

[](#reset)

This package does not generate a new math question for each request. Once the form has been submited without validation erros you can reset the library to force generate a new question.

```
app('mathcaptcha')->reset();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~127 days

Recently: every ~159 days

Total

6

Last Release

2672d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4

1.0.3PHP ^7.0

### Community

Maintainers

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

---

Top Contributors

[![L1lle](https://avatars.githubusercontent.com/u/182834?v=4)](https://github.com/L1lle "L1lle (10 commits)")[![antonamosov](https://avatars.githubusercontent.com/u/18592462?v=4)](https://github.com/antonamosov "antonamosov (4 commits)")

---

Tags

laravelmathcaptchalaravel5math captcha

### Embed Badge

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

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

###  Alternatives

[elic-dev/laravel-math-captcha

A simple math captcha for Laravel form validation.

1156.7k](/packages/elic-dev-laravel-math-captcha)[schuppo/password-strength

This package provides a validator for ensuring strong passwords in Laravel 4 applications.

1432.7M1](/packages/schuppo-password-strength)[bllim/laravalid

This package makes validation rules defined in laravel work client-side by converting to html/js plugins such as jquery validation. It also allows to use laravel validation messages so you can show same messages for both sides.

5915.2k](/packages/bllim-laravalid)[mdmsoft/yii2-captcha

Captcha with math equation

4211.1k](/packages/mdmsoft-yii2-captcha)[mohsen/captcha

A simple captcha for laravel 4

125.2k](/packages/mohsen-captcha)

PHPackages © 2026

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