captcha icon indicating copy to clipboard operation
captcha copied to clipboard

refresh image not work laravel 5.7.28, 5.8.3

Open msaied opened this issue 7 years ago • 6 comments

after update mews/captcha to 2.2.6 , captcha image work only on the first request after press refresh button image disappear

msaied avatar Mar 12 '19 05:03 msaied

I'm facing the same issue on 5.7 Updated : same on 5.8

tfevan avatar Mar 21 '19 23:03 tfevan

The problem is the same for me. Any Solution?

avicse1 avatar Apr 12 '19 06:04 avicse1

that is my problem

majidkashefy1 avatar Apr 22 '19 13:04 majidkashefy1

I solved this problem by these below method... No need any json request for getting new Captcha image.

In your view.blade.php

<img src="{{captcha_src('flat')}}" onclick="this.src='/captcha/flat?'+Math.random()" id="captchaCode" alt="" class="captcha">
                   
<a rel="nofollow" href="javascript:;" onclick="document.getElementById('captchaCode').src='captcha/flat?'+Math.random()" class="refresh">
                      
  <button type="button" class="btn btn-info btn-refresh"><i class="fas fa-sync-alt"></i></button>

</a>

Hope this helps

tfevan avatar May 10 '19 18:05 tfevan

@tfevan without an Ajax request how Laravel knows on server side the new captcha to validate?

RNKushwaha avatar Jul 21 '19 08:07 RNKushwaha

@tfevan Not sure how it works tbh but I just tested it and it does use the new captcha to validate

Dasonic avatar Aug 19 '19 01:08 Dasonic