Weave Code
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 (EU-hosted, GDPR-friendly proof-of-work CAPTCHA). Includes Blade widget/component, server-side verification + validation rule, and optional Livewire 4 support. PHP 8.2+, Laravel 12/13.

View on GitHub
Deep Wiki
Context7

Official Laravel SDK for captchaapi.eu - EU-hosted, GDPR-compliant proof-of-work CAPTCHA with native Livewire support.

Frequently asked questions about Laravel
How do I integrate captchaapi.eu into a Laravel 12/13 form without Livewire?
Use the Blade widget `<x-captchaapi::widget />` in your layout’s `<head>` and add `data-captcha` to your form fields. The package includes a validation rule (`ValidCaptcha`) to verify submissions server-side. No Livewire is required for basic functionality.
Does this package work with Laravel Octane (Swoole/RoadRunner)?
Yes, the package is stateless and uses request-scoped memoization, making it fully compatible with Laravel Octane. Verification calls are stateless and won’t interfere with async workers.
How do I test CAPTCHA validation in Laravel’s PHPUnit tests?
Enable the fake mode with `FakeCaptchaapi::enable()` before tests. The package supports mocking CAPTCHA responses, including edge cases like failed validation or rate limits, making it easy to test form submissions.
What happens if captchaapi.eu goes down? Can I fallback to another CAPTCHA?
The package defaults to `fail_open=true`, meaning forms will submit without CAPTCHA if the service is unavailable. For critical paths, set `fail_open=false` in `.env` to block submissions. However, switching to another CAPTCHA service would require rewriting validation logic.
Is the CAPTCHA widget compatible with Tailwind CSS or other frontend frameworks?
The Blade widget is a self-contained script that injects minimal HTML and CSS. It doesn’t rely on Tailwind or other frameworks, but you may need to override its default styling to match your design system.
How does Livewire integration work? Do I need Livewire 4?
Livewire integration is optional but requires Livewire 4. Use the `WithCaptcha` trait in your Livewire components and call `validateWithCaptcha()` in your rules. The package provides a Livewire-specific Blade component for seamless SPA-like interactions.
Can I use this CAPTCHA for high-traffic forms (e.g., 10,000+ submissions/day)?
The package supports high-volume forms, but you should monitor rate limits via `CAPTCHAAPI_DEBUG=true`. Consider caching validation results for logged-in users or implementing a local fallback (e.g., honeypot) during peak loads.
What Laravel versions and PHP versions are supported?
The package officially supports Laravel 12 and 13, with PHP 8.2+. It aligns with Laravel’s current LTS support and includes no breaking changes for these versions. Older Laravel versions are not supported.
How do I handle CAPTCHA failures or rate limits in the UI?
The package provides default error messages for failed validations or rate limits. You can customize these in your Blade templates or use JavaScript to handle `CAPTCHAAPI_ERROR` events emitted by the widget.
Is there a way to skip CAPTCHA for logged-in users or admins?
The package doesn’t include built-in logic for skipping CAPTCHA, but you can implement this via middleware or custom validation rules. For example, exclude logged-in users by checking `auth()->check()` before validating.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky