libcyber / geetest
Geetest for Laravel
1.1.2
2023-10-26 10:02 UTC
Requires
- php: ^7.2
- illuminate/routing: ^5.5 || ^6 || ^7
- illuminate/support: ^5.5 || ^6 || ^7
Requires (Dev)
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.0
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 byCaptchaVerify
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 fieldserver-get-config
, you can get your geetest id & and from database
Thanks
License
The MIT License (MIT).