Codeword's solution to "need help implementing google recaptcha in Laravel app/w vue.js"

I have tested you code on my computer.I mailed you the reason I think is causing the problem.Thank you<\/p>\n

Hey, this is the final solution to your problem. I have tested this code and it worked. open you codeEmailController onclass myand set computer.I mailed you the reasonconstructor Ifunction thinkto ``` public isfunction causing__construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also theopen problem.Thank you EmailRequest.php and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ```
Hey, this is the final solution to your problem. I have tested this code and it worked. open you **EmailController EmailController class** and set the constructor function to ``` public function __construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also open you **EmailRequest.php** and set the constructor function to ``` public function __construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also open you EmailRequest.php and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ``` ' ]; } ``` Hope it help and a tip would be appreciated.Thank you.
Hey, this is the final solution to your problem. I have tested this code and it worked. open you **EmailController class** and set the constructor function to ``` public function __construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also open you **EmailRequest.php** and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ``` Hope it help and a quick fix to your problem. I have tested this code and it worked. open you **EmailController class** and set the constructor function to ``` public function __construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also open you **EmailRequest.php** and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ``` Hope it helps and a tip would be appreciated.Thank you.
**100% working** tested Hey, this is a quick fix to your problem. I have tested this code and it worked. . open you **EmailController class** and set the constructor function to ``` public function __construct(Request $request) { parse_str ( parse_url ( $request->headers->get('referer') , PHP_URL_QUERY ) , $params ); $CAPTCHA=$params['g-recaptcha-response']; $request['g-recaptcha-response'] = $CAPTCHA; } ``` Also open you **EmailRequest.php** and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ``` open **Contact.vue** and just above axios.post add ``` this.email.grecaptcha=grecaptcha.getResponse(); ``` Hope it helps and a tip would be appreciated.Thank you.
**100% working** tested Hey, this is a quick fix to your problem. I have tested this code and it worked. . **1**.open you **EmailRequest.php** and set your rules(uncomment g-recaptcha-response line) to ``` public function rules() { return [ 'name' => 'required|max:100', 'email' => 'required|email|max:100', 'phone' => 'max:15', 'message' => 'required|max:1500', 'g-recaptcha-response'=>'required|recaptcha' ]; } ``` ' ]; } ``` **2** open **Contact.vue** and just above axios.post add ``` this.email.grecaptcha=grecaptcha.getResponse(); ``` (); ``` That's it. Hope it helps and a tip would be appreciated.Thank you.

User: Codeword

Question: need help implementing google recaptcha in Laravel app/w vue.js

Back to question