libcyber/geetest

Geetest for Laravel

1.1.2 2023-10-26 10:02 UTC

This package is not auto-updated.

Last update: 2025-01-17 14:07:11 UTC


README

Geetest for Laravel

Install

composer require libcyber/geetest

config

  • insert ServiceProvider into config/app.php
LibCyber\Geetest\GeetestServiceProvider::class,
  • insert Alias into config/app.php
'Geetest' => LibCyber\Geetest\Geetest::class,
  • publish config & view file
php artisan vendor:publish --provider='LibCyber\Geetest\GeetestServiceProvider'
  • insert config fileds into .env , or get the config by CaptchaVerify Component
GEETEST_ID=
GEETEST_KEY=

View Config Fields

Usage

  • render your web page
{!! Geetest::render() !!}
  • request Validate
$this->validate($request, [
    'geetest_challenge' => 'required|geetest'
], [
    'geetest' => config('geetest.server_fail_alert')
]);
  • get config from database By app/geetest.php the field server-get-config, you can get your geetest id & and from database

Thanks

Germey/LaravelGeetest

License

The MIT License (MIT).