scyllaly/geetest

Geetest for Laravel

1.2.0 2021-03-04 06:10 UTC

This package is auto-updated.

Last update: 2024-11-04 13:57:15 UTC


README

Geetest for Laravel

Install

composer require scyllaly/geetest

config

  • insert ServiceProvider into config/app.php
Scyllaly\Geetest\GeetestServiceProvider::class,
  • insert Alias into config/app.php
'Geetest' => Scyllaly\Geetest\Geetest::class,
  • publish config & view file
php artisan vendor:publish --provider='Scyllaly\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).