Download the PHP package canon1014/captcha-lumen without Composer
On this page you can find all versions of the php package canon1014/captcha-lumen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download canon1014/captcha-lumen
More information about canon1014/captcha-lumen
Files in canon1014/captcha-lumen
Download canon1014/captcha-lumen
More information about canon1014/captcha-lumen
Files in canon1014/captcha-lumen
Please rate this library. Is it a good library?
Informations about the package captcha-lumen
Captcha for Lumen 5.7
本项目修改自Captcha for Laravel 5 和 lumen-captcha
Requirement
Lumen version >= v5.5
Preview
Install
- 此 Package 必须开启 Redis才能使用,因为验证码与绑定验证码的 uuid 都是保存在Redis的。
How to use
在bootstrap/app.php
中注册Captcha Service Provider:
Set
在bootstrap/app.php
中可以设定各种自定义类型的验证码属性,更多详细设定请查看 Captcha for Laravel 5
如果不配置设定档,默认就是default,验证码有效时限为5分钟。
Example
因为 Lumen 都是无状态的 API,所以验证码图片都会绑上一个 UUID,先获得验证码的 UUID 跟图片的 URL,验证时再一併发送验证码与 UUID。
Generate
获得验证码:
type
就是在 config 中定义的 Type,如果不指定type
,默认为default
样式,Response:
captchaUrl
为验证码图片的 URL,captchaUuid
为绑定验证码图片的uuid。
validate
在发送 Request 时将验证码与 UUID 一併送回 Server 端,在接收参数时做验证即可:
Update log
- v1.0 (2019-07)
- 验证码图片的显示错误问题
- 验证码存储位置由Cache=>Redis
- 部分配置文件不生效
- 原版验证修改(计划)
Links
All versions of captcha-lumen with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
ext-gd Version *
illuminate/config Version ~5.0
illuminate/filesystem Version ~5.0
illuminate/support Version ~5.0
illuminate/hashing Version ~5.0
intervention/image Version ~2.2
ext-gd Version *
illuminate/config Version ~5.0
illuminate/filesystem Version ~5.0
illuminate/support Version ~5.0
illuminate/hashing Version ~5.0
intervention/image Version ~2.2
The package canon1014/captcha-lumen contains the following files
Loading the files please wait ....