I am using hesto/multi-auth for login.I want to add captcha for login and register.For that i am using bonecms/laravel-captcha.I Used validator for captcha on register.I need to add validator for the captcha on login Form.Where I want to add validator? How should I change my Login Controller?
For Register Form with Validator:
<div class="col-md-6">
@captcha
<input id="captcha" type="text" class="form-control" name="captcha">
</div>
On Register Controller
protected function validator(array $data) {
return Validator::make($data, [
'email' => 'required|email|max:255|unique:clients',
'password' => 'required|min:6|confirmed',
'captcha' => 'required|captcha',
]);
}
Login Form Code:
For Login Form view
<div class="col-md-6">
@captcha
<input id="captcha" type="text" class="form-control" name="captcha">
</div
I need to validate Captcha for login form.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire