PHP code example of tendollor / geetest

1. Go to this page and download the library: Download tendollor/geetest 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/ */

    

tendollor / geetest example snippets


	Misechow\Geetest\GeetestServiceProvider::class,
	

     'Geetest' => Misechow\Geetest\Facades\Geetest::class,
     

{!! Geetest::render() !!}

$this->validate($request, [
    'geetest_challenge' => '')
]);



namespace App\Components;

/**
 * Class CaptchaVerify
 *
 * @package App\Components
 */

Class CaptchaVerify 
{
    public static function geetestCaptchaGetConfig() 
    {
        return [
            "geetest_id" => Helpers::systemConfig()["geetest_id"], // 后台获取 id
            "geetest_key" => Helpers::systemConfig()["geetest_key"] // 后台获取 key
        ];
    }
}

shell
	php artisan vendor:publish --provider='Misechow\Geetest\GeetestServiceProvider'