How To Use ReCAPTCHA In Laravel 5.2 Forms For Validation

 

One of the ways to filter bot traffic is by using reCAPTCHA. It is a reverse Turing Test method to draw a line between organic and bots. reCAPTCHA, a rework of once-popular CAPTCHA, is a free online tool acquired and provided by Google. Source: https://www.cloudways.com/blog/use-recaptcha-laravel-forms-validation/
<?php
 
Route::get('/',function() {
return view('files.captchaform');
});
 
Route::get('captcha-form-validation',array('as'=>'google.get-recaptcha-validation-form','uses'=>'FileController@getCaptchaForm')) ;
Route::post('captcha-form-validation',array('as'=>'google.post-recaptcha-validation','uses'=>'FileController@postCaptchaForm')) ;
 
?>