- How do I install visavi/captcha in a Laravel application?
- Install the package with Composer using composer require visavi/captcha. After installation, follow the package README for any required configuration publishing or asset setup. Laravel package discovery should register the service provider automatically in most applications.
- Does visavi/captcha provide a Laravel validation rule?
- Yes. The package includes a Laravel validation rule for CAPTCHA checks, so you can add bot protection directly to your existing form request validation. This keeps CAPTCHA verification consistent with the rest of your Laravel validation flow.
- How does session-based CAPTCHA verification work in visavi/captcha?
- visavi/captcha generates a challenge and keeps the expected verification data in the Laravel session. When the form is submitted, the package validation rule compares the user input against the session-backed challenge. This avoids relying on an external verification API.
- Can I customize the CAPTCHA challenge output?
- Yes. The package supports customizable challenge output, allowing you to adjust how the CAPTCHA is presented in your forms. You can also configure routes and middleware as described in the package documentation.
- Does visavi/captcha require an external API or third-party service?
- No. visavi/captcha is designed with no external API dependencies, so CAPTCHA generation and validation happen within your Laravel application. This can simplify privacy reviews and avoid calls to third-party CAPTCHA services.
- How do I add a CAPTCHA to a Blade form with visavi/captcha?
- The package provides Blade and helper integration for rendering the CAPTCHA challenge in your forms. Add the generated challenge output and corresponding input field to your Blade template, then apply the package validation rule to the submitted request. Check the README for the exact helper names and markup.
- Which Laravel versions are supported by visavi/captcha?
- The provided package overview does not list specific Laravel version constraints. Check the package composer.json and README for the supported Laravel and PHP versions before installing. This is especially important when evaluating it for older or newly upgraded applications.
- Can visavi/captcha protect login, registration, and contact forms?
- Yes. visavi/captcha is intended for adding bot protection to Laravel forms such as contact, registration, and login forms. Because it integrates with Laravel validation, you can apply it wherever your application already validates submitted form data.
- How should I test forms protected by visavi/captcha?
- Because verification is session-based, tests should account for the CAPTCHA challenge data stored in the Laravel session. Review the package documentation for any recommended testing approach or helpers. In many Laravel test suites, you will need to prepare session state or bypass the CAPTCHA rule in test scenarios.
- Is visavi/captcha a good alternative to Google reCAPTCHA?
- visavi/captcha can be a good fit when you want self-hosted, image-based CAPTCHA protection without external API dependencies. It keeps verification inside your Laravel application and session flow. Evaluate usability and accessibility needs against your forms before choosing it over third-party services.