Download the PHP package vicens/captcha without Composer
On this page you can find all versions of the php package vicens/captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package captcha
简介
一个简单的laravel5图形验证码扩展包
环境要求
- PHP >= 5.5
- php-gd
- illuminate\support ^5.1
- symfony/http-foundation >= 2.0
安装
使用composer安装扩展包
先通过composer
安装扩展包到项目中
注册服务提供者和别名(Laravel5.5无需手动注册)
在config/app.php
配置文件的providers
数组中,注册服务提供者:
如果你使用Captcha
别名的话,在aliases
数组中注册别名:
配置
如果你想使用自己的配置,你可以执行以下命令发布配置文件config/captcha.php
:
基本用法
生成验证码图片实例
图片实例用法
直接返回Response
对象:
直接输出给浏览器:
输出img
标签:
返回base64
编码:
返回base64
Url地址:
返回图片二进制内容:
保存图片到服务器:
验证和测试
仅测试验证码的正确性:
检测验证码的正确性,并且从缓存中删除验证码:
使用中间件
在路由上使用:
在控制器中使用:
使用表单验证器
在控制器中使用:
在Request
中使用:
外观方法
返回验证码URL:
返回验证码img
标签:
返回可点击切换验证码的img
标签:
开源协议
All versions of captcha with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5
ext-gd Version *
symfony/http-foundation Version >=2.0
illuminate/support Version ^5.1
ext-gd Version *
symfony/http-foundation Version >=2.0
illuminate/support Version ^5.1
The package vicens/captcha contains the following files
Loading the files please wait ....