Categories: Laravel Application, Laravel Framework - The PHP Framework For Web Artisans

Google reCAPTCHA Packages For Laravel3 min read

Google reCAPTCHA Packages For Laravel
Reading Time: 3 minutes

Public Facing form is the most common thing that is attacked on a website. Whether it’s your Contact form or Support form, Bots/Spammer do not leave any chance to spam your server with filthy content (intentionally or unintentionally). To tackle this problem, many CMS already take precaution by using Anti-spam policies.In laravel also, there are 2/3 packages which use Google reCAPTCHA technology to tackle the spams. According to Google’s documentation,


reCAPTCHA protects you against spam and other types of automated abuse

reCAPTCHA uses an advanced risk analysis engine and adaptive CAPTCHAs to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.

Google reCAPTCHA
Google reCAPTCHA

reCAPTCHA offers more than just spam protection. Every time our CAPTCHAs are solved, that human effort helps digitize text, annotate images, and build machine learning datasets. This in turn helps preserve books, improve maps, and solve hard AI problems.

Read More :- Post On Facebook Page Via Laravel Notification

Laravel currently have 3 packages which implement reCAPTCHA policies. In my hunting down for reCAPTCHA packages, I find these two most suitable. Let’s discuss them one by one briefly.

reCAPTCHA Packages For Laravel

1. No Captcha reCaptcha

No Captcha reCaptcha by Nguyen Van Anh. is one of the most popular Lravael package for reCAPTCHA. It is been around since 2014 and is one of the most productive and easy to use package for Google reCaptcha to implement.To install this package just paste the following line in your command line.

As awesome as this package is, it does not support google reCAPTCHA v3 for now. Details settings for the package could be found at anhskohbo/no-captcha . In addition to that , this package could be used without Laravel what i mean to say is that we can use this package with simple PHP as follows.

2. Laravel ReCAPTCHA

Laravel ReCAPTCHA is a simple reCAPTCHA package for Laravel 5.5 or greater. The current version of the package is 3.x. Laravel reCAPTCHA package also supports the v3 version of the Google reCAPTCHA which is quite awesome. You can use v2/v1 versions also. To use this package first you need to register yourself and get your set of keys which will include Site Key and Secret key for the reCAPTCHA form to work.To install the package via composer , use the following command

Add the following line in youe config/app.php if you are using Laravel version below 5.5 as they don’t use the Auto-discovery fetaure of the Laravel. Add the following line manually.

You can use the Facade for shorter code as well.Use the following line for that

Details about the whole seatup could be found at Laravel reCAPTCHA

We are Done.

Thanks for completing the article till the end, I hope you have gained some knowledge from the article and it might be helpful for you in your quest for Google reCAPTCHA package for Laravel. I eventually ended up using the No Captcha reCAPTCHA, tell me what you will use and how was your experience with these packages.
I hope I have helped someone, please comment, share… ask question… I will try to answer all of them ASAP.

Cheers ! Happy Coding

All Rights Reserved @ Techanical-Atom
%d bloggers like this: