1. Go to this page and download the library: Download astritzeqiri/g-recaptcha library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// in blade.php files
{!! \GRecaptcha::renderScripts() !!}
// or in .php files
echo GRecaptcha::renderScripts();
// by default it echo's it out
GRecaptcha::render();
// if you want to save the html in a variable you call
$grecaptchaHtml = GRecaptcha::render([], false);
$grecaptcha = GRecaptcha::generate();
// to render it you call
$grecaptcha->renderHtml();
// if you dont want it to be rendered but store the html you call
$grecaptchaHtml = $grecaptcha->build();