02/11
2016
Wallogit.com
2017 © Pedro Peláez
中文验证码
, (*1)
Laravel 5.0.0 or later is required., (*2)
To get the latest version of Laravel Markdown, simply require the project using Composer:, (*3)
$ composer require kangkang66/captcha
Next, You should need to register the service provider. Open up config/app.php and add following into the providers key., (*4)
\Chinesecaptcha\ChinesecaptchaServiceProvider::class
How to use it, (*5)
//引用验证码
public function Captcha(Chinesecaptcha $chinesecaptcha)
{
$chinesecaptcha->outPut();
}
//验证
public function Valid(Request $request)
{
//1.使用验证规则
$validParams = [
'captcha' => 'required|chinesecaptcha',
];
//2.直接使用 session
$str = session()->get('captcha');
}