Download the PHP package hardphp/think-captcha without Composer
On this page you can find all versions of the php package hardphp/think-captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hardphp/think-captcha
More information about hardphp/think-captcha
Files in hardphp/think-captcha
Download hardphp/think-captcha
More information about hardphp/think-captcha
Files in hardphp/think-captcha
Vendor hardphp
Package think-captcha
Short Description captcha package for thinkphp,前后端分离,api接口调用
License Apache-2.0
Package think-captcha
Short Description captcha package for thinkphp,前后端分离,api接口调用
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package think-captcha
hardphp/think-captcha
thinkphp6 接口验证码类库
安装
composer require hardphp/think-captcha
使用
在控制器中输出验证码
在控制器的操作方法中使用
public function captcha($id = '')
{
return captcha($id);
}
然后注册对应的路由来输出验证码
输出验证码
注册一个验证码路由规则。
\think\facade\Route::get('captcha/[:id]', "\\hardphp\\captcha\\CaptchaController@index");
控制器里验证
使用TP的内置验证功能即可,验证码格式key-value
$this->validate($data,[
'captcha|验证码'=>'require|captcha'
]);
或者手动验证
if(!captcha_check($key,$captcha)){
//验证失败
};
All versions of think-captcha with dependencies
PHP Build Version
Package Version
The package hardphp/think-captcha contains the following files
Loading the files please wait ....