PHP code example of kangkang66 / captcha
1. Go to this page and download the library: Download kangkang66/captcha library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kangkang66 / captcha example snippets
\Chinesecaptcha\ChinesecaptchaServiceProvider::class
//引用验证码
public function Captcha(Chinesecaptcha $chinesecaptcha)
{
$chinesecaptcha->outPut();
}
//验证
public function Valid(Request $request)
{
//1.使用验证规则
$validParams = [
'captcha' => '