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

No Captcha Laravel Package

anhskohbo/no-captcha

Laravel package to integrate Google reCAPTCHA “No CAPTCHA” into your app. Provides helpers to render the JS, display normal or invisible widgets, and validate responses. Supports Laravel auto-discovery, with simple .env configuration for site key and secret.

View on GitHub
Deep Wiki
Context7

No CAPTCHA reCAPTCHA For Laravel.

Frequently asked questions about No Captcha
How do I install and set up anhskohbo/no-captcha in Laravel 5.5+?
Run `composer require anhskohbo/no-captcha`, then add your Google site and secret keys to `.env` under `NOCAPTCHA_SITEKEY` and `NOCAPTCHA_SECRET`. Laravel 5.5+ auto-discovers the package, so no manual `app.php` edits are needed.
Does this package support invisible reCAPTCHA (v2)?
Yes, use `NoCaptcha::displaySubmit('submitButtonId')` to render invisible reCAPTCHA tied to a specific form submit button. This is ideal for reducing visual clutter while maintaining bot protection.
Can I use this package with Laravel 5.1–5.4 or Lumen?
Yes, but you’ll need to manually register the service provider and facade in `app.php`. Lumen requires explicit service provider binding. For Laravel 5.1–5.4, also publish the config file with `php artisan vendor:publish`.
How do I validate reCAPTCHA responses in Laravel forms?
Add the `captcha` validation rule to your form request or controller. For example: `'g-recaptcha-response' => 'required|captcha'`. The package integrates natively with Laravel’s validation system.
Will this package work with React/Vue.js frontends without Blade?
No, this package relies on Blade helpers for rendering JS and widgets. For SPAs, use Inertia.js to render Blade components or expose a custom API endpoint to handle validation server-side.
What if Google reCAPTCHA is blocked in certain regions (e.g., China)?
Consider using a fallback like hCaptcha or implementing middleware to switch providers based on user location. The package’s facade can be extended to support alternative CAPTCHA services.
How do I customize the reCAPTCHA widget (e.g., dark theme, size)?
Pass an array of attributes to `NoCaptcha::display()`. For example: `NoCaptcha::display(['data-theme' => 'dark', 'data-size' => 'compact'])` to customize appearance and behavior.
Does this package support language localization for reCAPTCHA?
Yes, specify the language code when rendering JS: `NoCaptcha::renderJs('fr')` for French. Supported languages include `en`, `es`, `fr`, `de`, and more—check Google’s [language list](https://developers.google.com/recaptcha/docs/language).
How can I test reCAPTCHA validation in CI/CD pipelines?
Mock the `NoCaptcha` facade in tests using Laravel’s mocking helpers. For example: `NoCaptcha::shouldReceive('verifyResponse')->andReturn(true)`. This avoids hitting Google’s API during automated testing.
What are the performance implications of loading Google’s reCAPTCHA script?
Google’s script (~100KB) can impact page load time. Use `NoCaptcha::renderJs()` with lazy-loading or opt for invisible reCAPTCHA (`displaySubmit()`) to minimize performance overhead.
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope