PHPackages                             wtone/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. wtone/lumen-captcha

ActivePackage

wtone/lumen-captcha
===================

Laravel 5 &amp; 6 &amp; lumen 6 Captcha Package

1.0.3(6y ago)0698MITPHPPHP ^7.2CI failing

Since Mar 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wtone/lumen-captcha)[ Packagist](https://packagist.org/packages/wtone/lumen-captcha)[ Docs](https://github.com/mewebstudio/captcha)[ RSS](/packages/wtone-lumen-captcha/feed)WikiDiscussions master Synced today

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

Captcha for Laravel 5 &amp; 6 &amp; Lumen 6
===========================================

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

A simple Lumen service provider for including the [Captcha for Laravel](https://github.com/mewebstudio/captcha).

for Lumen 6

Preview
-------

[](#preview)

Based on [news/captcha](https://packagist.org/packages/mews/captcha?query=lumen-captcha)

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

[](#installation)

The Captcha Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `mews/captcha` package and setting the `minimum-stability` to `dev` (required for Lumen 6) in your project's `composer.json`.

```
{
    "require": {
        "wtone/lumen-captcha": "~2.0"
    },
    "minimum-stability": "dev"
}
```

or

Require this package with composer:

```
composer require wtone/lumen-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 `wtone/lumen-captcha`'s dependencies.

Usage
-----

[](#usage)

To use the Captcha Service Provider, you must register session provider and captcha provider when bootstrapping your application.

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

[](#configuration)

create a new file config/captcha.php

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

create a new file config/session.php

```
return [
    'driver' => env('SESSION_DRIVER', 'file'),//默认使用file驱动，你可以在.env中配置
    'lifetime' => 120,//缓存失效时间
    'expire_on_close' => false,
    'encrypt' => false,
    'files' => storage_path('framework/session'),//file缓存保存路径
    'connection' => null,
    'table' => 'sessions',
    'lottery' => [2, 100],
    'cookie' => 'laravel_session',
    'path' => '/',
    'domain' => null,
    'secure' => false,
];
```

in `bootstrap/app.php`.

```
    // regiseter Provider
    $app->register(Illuminate\Session\SessionServiceProvider::class);
    $app->register(Wtone\Captcha\CaptchaServiceProvider::class);
    // load config
    $app->configure('session');
    $app->configure('captcha');
    // set alias
    $app->alias('session', 'Illuminate\Session\SessionManager');
    $app->alias('Captcha', Wtone\Captcha\Facades\Captcha::class);
```

### make sure create folder "storage/framework/session" and chmod it

[](#make-sure-create-folder-storageframeworksession-and-chmod-it)

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.

^\_^

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

4

Last Release

2243d ago

### Community

Maintainers

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

---

Top Contributors

[![wtone](https://avatars.githubusercontent.com/u/11404879?v=4)](https://github.com/wtone "wtone (7 commits)")

---

Tags

captchalaravel5 Securitylaravel6 Captchalaravel6 SecurityLumen6 laravel6 Captcha

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mews/captcha

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

2.6k5.5M84](/packages/mews-captcha)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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