No Captcha is a Laravel package that renders Google reCAPTCHA on forms and validates responses server-side. It supports default, themed, and invisible challenge widgets.
Overview
No Captcha wires Google's reCAPTCHA into Laravel applications through a service provider, facade, and published configuration. Site and secret keys are read from environment variables and used when displaying the challenge and when verifying user submissions.
You load the JavaScript with render helpers, place the widget or invisible submit button on forms, and add validation rules such as requiring the g-recaptcha-response field plus a captcha rule. Custom validation messages can explain missing or failed challenges to users.
The package exposes display, displaySubmit, renderJs, and server-side verification helpers. Laravel 5.5 and newer can rely on auto-discovery; older setups register the provider and alias manually. Mocking the facade lets unit and HTTP tests bypass live Google checks.
A minimal non-Laravel example shows how to verify POST data and render widgets without the full framework stack.
Key features
- reCAPTCHA display and invisible submit helpers
- renderJs with language and callback options
- Laravel validation rule for captcha field
- Configurable theme and widget attributes
- Facade mocking for form and HTTP tests
- Published config and env-based keys
- Auto-discovery on modern Laravel versions
Use cases
- Protecting Laravel registration or contact forms
- Adding invisible reCAPTCHA to a submit button
- Localizing the reCAPTCHA script for multiple languages
- Testing forms that include a captcha field