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
Recaptcha Bundle

Recaptcha Bundle Laravel Package

vihuvac/recaptcha-bundle

A Symfony bundle that integrates Google reCAPTCHA into forms with configurable site and secret keys, form type support, and server-side validation. It provides straightforward setup for adding spam and abuse protection to Symfony applications.

View on GitHub
Deep Wiki
Context7

This bundle provides an easy reCAPTCHA form field integration into a Symfony Project

Frequently asked questions about Recaptcha Bundle
Is vihuvac/recaptcha-bundle a Laravel package?
No. It is a Symfony bundle that integrates Google reCAPTCHA through Symfony bundle configuration, Twig helpers, and a validator constraint. Laravel applications use Blade and a different package architecture, so this bundle is not a drop-in Laravel solution.
How do I install vihuvac/recaptcha-bundle with Composer?
You install it with Composer using the package name vihuvac/recaptcha-bundle, then enable the bundle in a Symfony application. The provided overview does not list exact install commands or Symfony registration steps. Installing it in Laravel alone will not provide the Twig helpers or Symfony validator integration.
Does this bundle work with Laravel Blade forms?
No. The package provides a Twig form theme and helper for rendering the reCAPTCHA widget, and Laravel uses Blade instead of Twig. Laravel developers would need a Laravel-specific package or custom Blade component plus server-side verification. The Symfony validator constraint also will not work as-is in Laravel.
How do I configure the reCAPTCHA site and secret keys?
The bundle is configured with site and secret keys through its bundle configuration. You should keep the secret key in environment variables rather than committing it to source control. The overview does not specify the exact configuration key names, so check the bundle documentation for the precise format.
Which reCAPTCHA modes are supported?
The overview states support for reCAPTCHA v2 checkbox and invisible modes. It does not mention reCAPTCHA v3 or score-based verification. If you need v3, you should confirm support in the package documentation or choose another integration.
How does server-side reCAPTCHA verification work?
The bundle provides server-side verification through a validator constraint. It also integrates a PSR-18 HTTP client for sending verification requests to Google. In a Symfony form, you would typically attach the constraint so submitted tokens are validated before accepting the form.
Can I use a custom PSR-18 HTTP client for verification?
The package includes PSR-18/HTTP client integration for verification requests, which suggests it can work with PSR-18-compatible clients. The overview does not document the exact injection or configuration method. Check the bundle configuration to see how to supply your own client.
Is this bundle compatible with Laravel versions?
No Laravel version compatibility is claimed. This is a Symfony bundle built around Symfony bundle configuration, Twig, and a Symfony validator constraint. Laravel version support would not apply unless you port the integration yourself.
How can I test reCAPTCHA validation without hitting Google?
The provided overview does not describe testing helpers or fake verification modes. In Symfony, you would typically mock the PSR-18 HTTP client or the validator constraint in your test suite. In Laravel, you would use HTTP fakes for a custom verification implementation, but that is outside this bundle.
What alternatives should Laravel developers consider for reCAPTCHA?
Laravel developers should look for Laravel-specific reCAPTCHA packages or implement Google verification with Laravel's HTTP client and validation rules. This bundle is best suited to Symfony applications using Twig forms. Using it in Laravel would require replacing the Twig and Symfony validator pieces.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo