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

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

trueifnotfalse/lumen-captcha
============================

Laravel Lumen Captcha Package

1.0.3(2y ago)336.9k2MITPHPPHP ^7.2|^8.0

Since Aug 2Pushed 2y ago1 watchersCompare

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

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

Captcha for Laravel Lumen 8
===========================

[](#captcha-for-laravel-lumen-8)

Preview
-------

[](#preview)

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

- [Captcha for Laravel Lumen 8](#captcha-for-laravel-lumen-8)
    - [Preview](#preview)
    - [Installation](#installation)
    - [Usage](#usage)
    - [Configuration](#configuration)
    - [Example Usage](#example-usage)
        - [Stateless Mode:](#stateless-mode-)
- [Return Image](#return-image)
- [Return URL](#return-url)
- [Return HTML](#return-html)
- [To use different configurations](#to-use-different-configurations)
    - [Links](#links)

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

[](#installation)

The Captcha Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `trueifnotfalse/lumen-captcha` package.

Require this package with composer:

```
composer require trueifnotfalse/lumen-captcha

```

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

Usage
-----

[](#usage)

To use the Captcha Service Provider, you must register the provider when bootstrapping your application. There are essentially two ways to do this.

Add to `bootstrap/app.php` and register the Captcha Service Provider.

```
    $app->register(TrueIfNotFalse\LumenCaptcha\CaptchaServiceProvider::class);
```

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

[](#configuration)

To use your own settings, create config file.

`config/captcha.php`

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

and enable it in `bootstrap/app.php`

```
    $app->configure('captcha');
```

### Stateless Mode:

[](#stateless-mode)

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

```
    //key is the one that you got from json response
    $rules = ['captcha' => 'required|captcha:'. request('key') . ',math'];
```

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

[](#return-image)

```
captcha();
```

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

[](#return-url)

```
captcha_src();
```

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

[](#return-html)

```
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)

Links
-----

[](#links)

- [Intervention Image](https://github.com/Intervention/image)
- [License](http://www.opensource.org/licenses/mit-license.php)
- [Laravel Lumen website](http://lumen.laravel.com)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~229 days

Total

4

Last Release

1055d ago

### Community

Maintainers

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

---

Top Contributors

[![mewebstudio](https://avatars.githubusercontent.com/u/2125733?v=4)](https://github.com/mewebstudio "mewebstudio (125 commits)")[![mauris](https://avatars.githubusercontent.com/u/996939?v=4)](https://github.com/mauris "mauris (33 commits)")[![mwllgr](https://avatars.githubusercontent.com/u/25794895?v=4)](https://github.com/mwllgr "mwllgr (10 commits)")[![sineld](https://avatars.githubusercontent.com/u/445349?v=4)](https://github.com/sineld "sineld (7 commits)")[![trueifnotfalse](https://avatars.githubusercontent.com/u/34368359?v=4)](https://github.com/trueifnotfalse "trueifnotfalse (6 commits)")[![saidbakr](https://avatars.githubusercontent.com/u/467554?v=4)](https://github.com/saidbakr "saidbakr (5 commits)")[![jxlwqq](https://avatars.githubusercontent.com/u/2421068?v=4)](https://github.com/jxlwqq "jxlwqq (3 commits)")[![hutushen222](https://avatars.githubusercontent.com/u/352215?v=4)](https://github.com/hutushen222 "hutushen222 (3 commits)")[![khalilst](https://avatars.githubusercontent.com/u/9103966?v=4)](https://github.com/khalilst "khalilst (3 commits)")[![Assmay](https://avatars.githubusercontent.com/u/18699209?v=4)](https://github.com/Assmay "Assmay (2 commits)")[![farzinghanbari](https://avatars.githubusercontent.com/u/14145192?v=4)](https://github.com/farzinghanbari "farzinghanbari (2 commits)")[![jp7anderson](https://avatars.githubusercontent.com/u/9416588?v=4)](https://github.com/jp7anderson "jp7anderson (2 commits)")[![mweghorst](https://avatars.githubusercontent.com/u/9582326?v=4)](https://github.com/mweghorst "mweghorst (1 commits)")[![naneri](https://avatars.githubusercontent.com/u/5573469?v=4)](https://github.com/naneri "naneri (1 commits)")[![ocalypto](https://avatars.githubusercontent.com/u/829777?v=4)](https://github.com/ocalypto "ocalypto (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![smartpixelim](https://avatars.githubusercontent.com/u/6251872?v=4)](https://github.com/smartpixelim "smartpixelim (1 commits)")[![vinodraut](https://avatars.githubusercontent.com/u/12695172?v=4)](https://github.com/vinodraut "vinodraut (1 commits)")[![ycrao](https://avatars.githubusercontent.com/u/3280204?v=4)](https://github.com/ycrao "ycrao (1 commits)")[![eromoe](https://avatars.githubusercontent.com/u/3938751?v=4)](https://github.com/eromoe "eromoe (1 commits)")

---

Tags

captchalumen-frameworkcaptchalumen CaptchaLaravel Lumen Captcha

### Embed Badge

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

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

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M73](/packages/unisharp-laravel-filemanager)[mews/captcha

Laravel 5/6/7/8/9/10/11/12 Captcha Package

2.6k5.5M84](/packages/mews-captcha)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[yangbx/captcha-lumen

captcha for lumen

123.8k](/packages/yangbx-captcha-lumen)[bonecms/laravel-captcha

Captcha integration for Laravel

76138.4k](/packages/bonecms-laravel-captcha)

PHPackages © 2026

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