anhskohbo / no-captcha

No CAPTCHA reCAPTCHA For Laravel.
https://packagist.org/packages/anhskohbo/no-captcha
MIT License
1.77k stars 233 forks source link

Update for multiple app('captcha')->display() on the same page #57

Closed seltix5 closed 7 years ago

seltix5 commented 7 years ago

with this update will be possible to just call the noRecaptcha on the same page without requesting the api multiple times, just like this :

app('captcha')->display()

anhskohbo commented 7 years ago

Thanks for pull request, pls check my code review.

anhskohbo commented 7 years ago

I need test this pr before make a new release

seltix5 commented 7 years ago

sure ^^

anhskohbo commented 7 years ago

Hi seltix5, could you give me a example about multiple widgets in a page?

See: https://developers.google.com/recaptcha/docs/display

seltix5 commented 7 years ago

hi! so, after furder checking this situation, i forget that the default google reCaptcha code will automatically render only the first div/instance, so i added a function to use the "explicit" mode, with this changes to request only one noCaptcha just call display :

{!! app('captcha')->display() !!}

when usign multipla instance we should call only the functio multiple_display like this :

{!! app('captcha')->multiple_display() !!} ..... {!! app('captcha')->multiple_display() !!}

what do you think?

https://github.com/anhskohbo/no-captcha/pull/58