captchaapi/laravel
Official Laravel SDK for captchaapi.eu, an EU-hosted, GDPR-compliant proof-of-work CAPTCHA. Ships a drop-in Blade component, validation rule, and Livewire trait. No cookies, no tracking, no Google—server-side verification keeps your secret key safe.
WithCaptcha trait, <x-captchaapi::livewire-form> wrapper, and event-mode dispatch are the differentiated part. If your roadmap is Livewire 4 forms, this removes the usual "CAPTCHA doesn't play well with Livewire validation cycles" tax — including the Fortify double-validation edge case, which is called out and testable.data-captcha-no-color) supports designing the waiting/error UX rather than bolting it on.fail_open defaults to true (public forms) and can be flipped to false for login/payment — that is a documented, per-environment product risk policy, not an implicit one. Likewise CAPTCHAAPI_ENABLED=false as a permanent kill switch keeps local/CI/staging clean without branching markup.FakeCaptchaapi::enable() plus enforceSingleUse() means feature tests and CI don't need live keys or network calls, and you can actually test the single-use contract instead of silently bypassing it. This is the kind of detail that decides whether a security control survives contact with a fast-moving team.Consider it when most of these are true:
Look elsewhere when:
base_url is overridable but you're still calling a vendor).Recommended gate: timebox a spike, wrap the rule behind an internal BotCheck abstraction, and keep a documented fallback provider. Do not let the Blade component and the captcha validation alias leak into hundreds of templates before the vendor question is settled.
To executives:
We have a recurring abuse exposure on every public form, and our EU customers' legal teams push back on Google-hosted CAPTCHA. This is a drop-in Laravel package for an EU-hosted, GDPR-compliant CAPTCHA that's invisible to real users — no puzzles, so we don't trade conversion for protection. It's MIT-licensed, the integration is roughly a day of engineering, and there's a documented kill switch and fail-open policy so a vendor outage can't block our signups. The vendor is new and small, so the proposal is a timeboxed pilot behind an internal abstraction with a fallback provider — low cost to try, no lock-in if it doesn't hold up.
To engineering:
composer require captchaapi/laravel, publish config, two env vars. Blade:<x-captchaapi::widget />in the layout plusdata-captchaon the form; validate withnew ValidCaptchaor thecaptchastring alias. Livewire:use WithCaptchaandvalidateWithCaptcha()— the wrapper handles the event-mode dispatch and hidden input. It's Octane-safe (stateless verify, per-request memo, fake state throws outsidetesting),FakeCaptchaapi::enable()gets you green tests without network calls, andenforceSingleUse()lets you prove Fortify's double-validation doesn't quietly bypass the check.fail_openis configurable per environment — default true for public forms, flip to false for login/payment. Secret rotation has an overlap window so no hard-cutover deploy. Small codebase, MIT, PHPStan 8, Pest — auditable in an afternoon.
To legal / DPO:
No cookies, no tracking, no Google. Data stays in the EU (Hetzner Nuremberg), and verification is server-to-server with the secret never reaching the browser. Still required from us: a DPA with the vendor and a retention answer for verification metadata — the README documents the architecture, not the data-processing terms, so that's an open item before production.
How can I help you explore Laravel packages today?