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

Laravel Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a thin, well-scoped adapter rather than a framework: a Blade widget component, a ValidCaptcha validation rule (plus a captcha string alias), a Livewire WithCaptcha trait, and a livewire-form wrapper. That is the right shape for a Laravel integration — it slots into the existing validation pipeline and Form Request / $request->validate() patterns instead of introducing a parallel verification mechanism, and it does not fight the framework's conventions. The Livewire support is the genuine differentiator: first-class trait + event-mode wrapper is meaningfully less integration work than hand-rolling a CustomEvent bridge, and Livewire-heavy stacks are common in the target market. The trade-off is that the package is only the client half — the actual verdict comes from captchaapi.eu, a commercial SaaS endpoint. We are evaluating a dependency on a vendor service as much as on a Composer package.

Integration feasibility. Low engineering effort. A developer can go from composer require to a guarded form in well under a day following the README: publish config, set two env vars, drop <x-captchaapi::widget /> in the layout, add data-captcha to the form, add the rule. The inclusion of FakeCaptchaapi::enable() for feature tests, a permanent CAPTCHAAPI_ENABLED kill switch, and documented Octane safety (per-request memo on the request, not the singleton; fake state throws outside testing) signals the maintainers understand production Laravel. Secret rotation with an overlap window is a mature operational detail that most hobby-tier CAPTCHA packages lack.

Technical risk. This is where the assessment turns cautious. Three concerns dominate:

  • Vendor concentration and maturity. One GitHub star, zero dependents, and an official SDK published by the same company that sells the backend. There is no community validation, no third-party code review surface, and no evidence of adoption at scale. The package could be excellent and still be abandoned or re-licensed-adjacent in twelve months. The MIT license protects the code, but not the service the code depends on.
  • Narrow platform window. PHP 8.2+ and Laravel 12 or 13 only — that excludes every shop still on Laravel 10/11, which is most of the installed base today. This is a deliberate support-cost decision, but it caps addressable adoption and means we inherit the maintainers' upgrade cadence as our own constraint.
  • Security model mismatch on proof-of-work. PoW raises the cost of naive, single-origin scraping and is genuinely frictionless and accessible (no image puzzles, no cookies, no Google data transfer — a real GDPR story). It is materially weaker against distributed botnets, residential proxy pools, and headless-browser farms that treat compute as cheap. If the protection target is credential stuffing or payment fraud, PoW is a speed bump, not a control. It is a better fit for contact forms, signup spam, and newsletter abuse.

Key questions.

  1. What is the contractual SLA and incident-comms commitment for the verify endpoint, and is there a status page we can monitor?
  2. Do we have a measured false-negative rate against our actual bot traffic, or are we accepting the vendor's positioning on faith?
  3. Who maintains this package, and what is the stated policy for supporting new Laravel majors (Laravel 14 lands roughly annually)?
  4. What is the data-processing agreement, and does the verify payload include anything beyond the token (IP, user agent)? The README is silent on payload contents.
  5. What is the egress requirement — can our network policy reach a Hetzner Nuremberg origin, and does the widget script create a CSP gap we'd need to whitelist?
  6. Is there a self-hosted or on-prem option, or is this irreducibly SaaS?

Integration Approach

Stack fit. Good-to-excellent for a specific profile: Laravel 12/13, PHP 8.2+, Blade-rendered forms, Livewire 4 components, optionally Octane. It also fits well with Fortify-based auth — the README explicitly documents Fortify's double-validation behavior and provides enforceSingleUse() to prove the integration handles it, which is exactly the kind of edge case that silently breaks naive CAPTCHA integrations. It fits poorly for API-only services, Inertia/Vue front ends without Blade (the widget is a Blade component; an SPA would need manual wiring of mode=event), and any application pinned below Laravel 12.

Migration path. Treat this as a parallel-run replacement, not a rip-and-replace, for reCAPTCHA/hCaptcha. Because CAPTCHAAPI_ENABLED=false makes the rule pass silently and the widget render nothing, the same code can ship to every environment and be enabled per-environment or per-route. Recommended path:

  1. Ship the package and wiring with CAPTCHAAPI_ENABLED=false everywhere. Zero behavioral change, all plumbing validated by the existing test suite.
  2. Enable on one low-risk form in staging. Confirm the widget renders, the response field populates, and the verify round-trip succeeds.
  3. Enable in production on the lowest-value public form (contact, newsletter). Measure for two weeks.
  4. Expand route by route, keeping a documented list of protected routes rather than a global switch.
  5. Only after a clean window, retire the incumbent CAPTCHA on the migrated routes.

Compatibility. Verify before committing: exact Laravel minor version support (the "12 or 13" claim should be confirmed against our current lockfile), Livewire 4 availability if we depend on the trait, CSP headers (the widget script loads from captchaapi.eu, and the inline config push to window.CAPTCHA_* may need a nonce or hash), and EU egress from all application subnets including queue workers and any Octane workers. If we run Fortify, budget an explicit test using enforceSingleUse() so the double-validation path is proven rather than assumed.

Sequencing. Package evaluation and CSP/egress work first (cheap, no production exposure). Then fake-mode test coverage of the validation rule across all protected routes — this is the highest-leverage step because it validates the integration without any vendor dependency. Then a single production form. Then breadth. The fail-open policy decision should be made per route class, not globally, before any enablement — see below.

Operational Impact

Maintenance. Small surface area: one Composer dependency, two env vars, one config file, and a handful of Blade components. The real maintenance burden is not the package but the version window — supporting only Laravel 12/13 means our Laravel upgrade cadence is coupled to the maintainers' release cadence, and a lag on their side could block a security-driven framework upgrade on ours. Budget a standing line item for reviewing their changelog each Laravel major. The narrow adoption (0 dependents) also means we are effectively the QA function: we will find integration bugs before anyone else does.

Support. Single-vendor, GitHub-issue-based support with no published SLA and no commercial support tier mentioned. Security disclosures route through GitHub private advisories, which is correct practice but assumes an attentive maintainer. Realistically this is self-supported: we should be prepared to read the source. Mitigating factor — the package is MIT and small, so forking and patching is a viable escape hatch if the maintainer goes quiet.

Scaling. Every protected submission adds one synchronous outbound HTTP call with a 5-second default timeout. That is the key scaling characteristic: it is a serial dependency in the request path. At low volume it is invisible; at high volume on a login or checkout route it becomes a tail-latency contributor and, under vendor degradation, a worker-pool exhaustion risk (5s × concurrent submissions). Mitigations: lower CAPTCHAAPI_VERIFY_TIMEOUT to 2–3s, cap concurrency on protected routes, and consider whether protected routes should run on a separate worker pool. Octane compatibility is explicitly documented and correctly implemented, so there is no cross-request state-leak concern — that is a genuine plus and removes a whole class of failure mode.

Failure modes. The package's own documentation is unusually candid here, which is worth crediting:

  • Vendor unreachable / 5xx → governed by fail_open, default true (let the submission through). Correct default for a marketing contact form; wrong for login and payment. This must be set per route class (CAPTCHAAPI_FAIL_OPEN=false for auth and payment) rather than accepted as a global default — a single global true quietly means "our CAPTCHA turns itself off during any vendor outage," and an attacker who can induce or time an outage gets a free pass.
  • Token expiry / replay → responses are single-use and short-lived (~2 min); ValidCaptcha rejects invalid, expired, and already-used tokens with a field-scoped error. Rejections surface as a normal Laravel validation error, so user-facing behavior degrades gracefully.
  • Secret rotation → overlap window means no hard cutover; "Revoke immediately" is the compromise path and will fail in-flight solutions until redeploy. Document this runbook.
  • Rate limiting → the widget exposes a rate_limited state; confirm our own route throttles are still in place rather than treating the CAPTCHA as a rate limiter.
  • Misconfiguration → enabled=true with a null site_key is a plausible silent-failure state; add a startup or health check asserting that if enabled, both keys are present.
  • Scope of protection → as noted, PoW does not stop distributed botnets. Do not let this package displace rate limiting, WAF rules, or credential-stuffing detection on sensitive routes.

Ramp-up. Low for a Laravel developer — the README is genuinely good, with copy-pasteable examples for plain forms, Livewire, error rendering, status styling, testing, and Octane. Estimate half a day for a first integration, one to two days for full test coverage across protected routes plus the fail-policy matrix. Two adoption frictions to plan for: the Tailwind/design-system path requires deliberately opting out via data-captcha-no-color and then supplying per-state colors (the waiting/ready icon collision will otherwise produce a confusing UI), and the opt-in [data-captcha-status] element means a team that skips it ships a silently-working form with no user-visible progress signal — a support-ticket generator during vendor slowness.

Overall TPM recommendation. Technically well-built and unusually honest about its own trade-offs; a strong fit for EU-facing Laravel 12/13 + Livewire shops that need a GDPR-clean, accessible, frictionless CAPTCHA on low-to-medium-risk public forms. The blockers are not code quality — they are vendor concentration, a narrow framework support window, and a proof-of-work threat model that should not be relied on for auth or payment without fail-closed configuration and complementary controls. Recommend a scoped pilot on non-sensitive forms with an explicit per-route fail-policy decision and a documented fork-if-abandoned contingency, rather than a broad rollout.

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.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator