Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh image not work laravel 5.7.28, 5.8.3 #160

Open
msaied opened this issue Mar 12, 2019 · 6 comments
Open

refresh image not work laravel 5.7.28, 5.8.3 #160

msaied opened this issue Mar 12, 2019 · 6 comments

Comments

@msaied
Copy link

msaied commented Mar 12, 2019

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

@msaied msaied changed the title refresh image not work laravel 5.7.28 refresh image not work laravel 5.7.28, 5.8.3 Mar 12, 2019
@tfevan
Copy link

tfevan commented Mar 21, 2019

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

@avicse1
Copy link

avicse1 commented Apr 12, 2019

The problem is the same for me. Any Solution?

@majidkashefy1
Copy link

that is my problem

@tfevan
Copy link

tfevan commented May 10, 2019

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

@RNKushwaha
Copy link

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

@Dasonic
Copy link

Dasonic commented Aug 19, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants