0
votes

I am pretty new in PHP and Laravel and I have the following problem: into my Laravel application I have to implement a page containing a form that have to contain a Google reCAPTCHA field. The submitted form will be validated if the reCAPTCHA field is correctly compiled. I have no previous experience with reCAPTCHA.

I have found this tutorial:

https://tuts.codingo.me/google-recaptcha-in-laravel-application

In this tutorial it says that:

I will first visit Google reCaptcha site https://www.google.com/recaptcha/ and register new site there. Good thing is that you can insert multiple domains, so same captcha placement can work on your development domain and production domain.

So it says that I have to register my domain here:

https://www.google.com/recaptcha/admin#list

Why? Because in this way the reCAPTCHA service can send the captcha text to my website? Or what?

My problem is that at this time my Laravel web site is running on my local development laptop (on my XAMPP localhost Apache server).

Can I test it on my localhost server in some way or is it impossible to do and I have to deploy it on my remote server using the associated domain?

2

2 Answers

1
votes

Your reCAPTCHA will work on domains you provide and their subdomains. If you need localhost, just add it to the list

For more info, read the docs.

0
votes

Yes you can. You have to add in domains list: localhost or 127.0.0.1