scyllaly / geetest
Geetest for Laravel
1.2.0
2021-03-04 06:10 UTC
Requires
- php: ^7.3
- guzzlehttp/guzzle: ^6.3|^7.0
- illuminate/routing: ^6|^7|^8
- illuminate/support: ^6|^7|^8
Requires (Dev)
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.0
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 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).