Download the PHP package tridiamond/captcha-lumen5 without Composer
On this page you can find all versions of the php package tridiamond/captcha-lumen5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tridiamond/captcha-lumen5
More information about tridiamond/captcha-lumen5
Files in tridiamond/captcha-lumen5
Download tridiamond/captcha-lumen5
More information about tridiamond/captcha-lumen5
Files in tridiamond/captcha-lumen5
Please rate this library. Is it a good library?
Informations about the package captcha-lumen5
Captcha for Lumen5
本項目修改 Captcha for Laravel 5 和 lumen-captcha 加上了lumen 5.5 支持, 也修复了一些导致不能用的bug
Preview
Install
- 此 Package 必须开启 Cache 才能使用,应为验证码是保存在cache里面。
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 端,在接收參數時做驗證即可:
Links
All versions of captcha-lumen5 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 tridiamond/captcha-lumen5 contains the following files
Loading the files please wait ....