Skip to content

Instantly share code, notes, and snippets.

@azazqadir
Created March 28, 2018 15:53
Show Gist options
  • Save azazqadir/505846584e27a489f7c2f6fba450f876 to your computer and use it in GitHub Desktop.
Save azazqadir/505846584e27a489f7c2f6fba450f876 to your computer and use it in GitHub Desktop.
Implement Recaptcha With Validation in Laravel: https://www.cloudways.com/blog/use-recaptcha-laravel-forms-validation/

Get Necessary Packages Let’s get the necessary classes we will require to make things possible. I’ll be using Composer to bring down the packages:

$ composer requireanhskohbo/no-captcha

Set up Configurations We are going to edit the app.php file.

Insert these lines in “providers” array:

 Anhskohbo\NoCaptcha\NoCaptchaServiceProvider::class,

Now, let’s setup our secret keys. Go to this link, and enter your domain address, like I have shown in image below, to grab your “secret key” and “site key”.

Make changes to your “.env” file:

Insert these lines:

NOCAPTCHA_SECRET= PUT YOUR SECRET KEY HERE

NOCAPTCHA_SITEKEY= PUT YOUR SITE KEY HERE

Read more at: Recaptcha with Validation Laravel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment