Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Easy Geetest

Easy Geetest Laravel Package

beastphp/easy-geetest

EasyGeetest PHP SDK for integrating Geetest CAPTCHA with modern PHP (>=7.1). Composer-ready, namespaced wrapper based on the official SDK. Instantiate with captcha_id/private_key and call successValidate with challenge/validate/seccode plus optional user/client/ip info.

View on GitHub
Deep Wiki
Context7

极验geetest PHP SDK

Frequently asked questions about Easy Geetest
Does beastphp/easy-geetest work with Laravel 9 or 10?
The package supports PHP 7.1+, but Laravel 9/10 require PHP 8.x. You’ll need to manually update type hints or use a compatibility layer. Test thoroughly, as the last release (2018) may lack Laravel 8+ features like named arguments or strict typing.
How do I integrate Geetest CAPTCHA into Laravel login forms?
Register the Geetest client as a singleton in Laravel’s service container, then inject it into controllers or create a custom validation rule. Use middleware to enforce CAPTCHA checks on login routes. Example: `app(Geetest::class)->successVerify($request->input('geetest_challenge'), ...)`.
Are Geetest API keys securely stored in this package?
No, the package doesn’t enforce secure storage. Store keys in Laravel’s `.env` file (e.g., `GEETEST_SECRET_ID`) and use `config()` to access them. Avoid hardcoding credentials in your application code or version control.
What happens if Geetest’s API changes after 2018?
The package may break due to undocumented API updates. Compare Geetest’s current API docs with the 2018 version and fork the package if needed. Consider wrapping API calls in a service layer to isolate changes.
Can I use this package for API endpoints instead of forms?
Yes, but you’ll need to manually handle CAPTCHA validation in API requests. Use Laravel’s `ValidateCaptcha` trait or custom rules to verify `geetest_challenge`, `geetest_validate`, and `geetest_seccode` in incoming requests.
Is there built-in support for Laravel’s validation system?
No, you’ll need to create a custom validation rule (e.g., `ValidateGeetest`) or middleware. Example: `return $geetest->successVerify($request->geetest_challenge, $request->geetest_validate, $request->geetest_seccode);`.
What alternatives exist for Geetest in Laravel?
Consider `laravel-captcha` (simple), `mll-laravel-captcha` (reCAPTCHA), or Geetest’s official PHP SDK if it’s updated. Alternatives like hCaptcha or Cloudflare Turnstile may offer better maintenance and Laravel integration.
How do I handle failed CAPTCHA submissions in production?
Implement retries with user feedback (e.g., `withErrors(['captcha' => 'Invalid CAPTCHA'])`). Log failed attempts to monitor abuse. For APIs, return HTTP 422 with error details. Consider rate-limiting to prevent brute-force attacks.
Does this package support Geetest’s v4 API?
Unlikely, as the package was last updated in 2018. Check Geetest’s API docs for v4 changes (e.g., `preProcess` → `validate`). You may need to fork the package or use Geetest’s official SDK if available.
How do I test CAPTCHA validation in Laravel’s test suite?
Mock the Geetest client using Laravel’s `Mockery` or `PHPUnit`. Example: `$this->mock(Geetest::class)->shouldReceive('successVerify')->andReturn(true);`. Test both valid and invalid CAPTCHA scenarios with assertions for redirects or validation errors.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support