使用Ajax刷新laravel 5.6中的验证码图像

时间:2018-11-28 09:31:42

标签: php ajax recaptcha captcha laravel-5.6

我的视图文件login.blade.php具有验证码

<div  class="col-sm-4 text-right">
    {!!  captcha_img() !!}
</div>

我的控制器没有类似的验证

$this->validate($request, [
        $this->username() => 'required|string',
        'password' => 'required|string',
        'captcha' => 'required|captcha',
            ], ['captcha' => 'Captcha Invalid.']
    );

请告诉我如何使用Ajax和laravel刷新验证码?

0 个答案:

没有答案