refresh image not work laravel 5.7.28, 5.8.3
after update mews/captcha to 2.2.6 , captcha image work only on the first request after press refresh button image disappear
I'm facing the same issue on 5.7 Updated : same on 5.8
The problem is the same for me. Any Solution?
that is my problem
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 without an Ajax request how Laravel knows on server side the new captcha to validate?
@tfevan Not sure how it works tbh but I just tested it and it does use the new captcha to validate