A Laravel service provider for generating and validating CAPTCHA images, including math-based challenges.
Captcha for Laravel is a PHP package that adds CAPTCHA functionality to Laravel applications. It generates image-based or math-based CAPTCHAs to protect forms from automated bot submissions and integrates seamlessly with Laravel's validation system. The package provides configurable options for CAPTCHA appearance and supports both session-based and stateless API validation.
Laravel developers who need to secure forms, registration pages, or API endpoints against spam and automated attacks. It's particularly useful for projects requiring simple, customizable CAPTCHA implementation without external services.
Developers choose this package because it's a native Laravel solution with minimal setup, offering flexible CAPTCHA types (image and math), built-in validation rules, and easy customization. It eliminates the need for third-party CAPTCHA services while maintaining compatibility with Laravel 5 through 12.
Captcha for Laravel 5+
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes a custom 'captcha' validation rule that works seamlessly with Laravel's validator, simplifying server-side verification as shown in the example code for session and stateless modes.
Supports both image-based and math-based CAPTCHAs, with configurable settings for length, size, and background, allowing flexibility based on user needs as detailed in the configuration section.
Offers both traditional session-based validation and stateless API mode with unique keys, making it suitable for web forms and RESTful APIs, with clear examples in the README.
Allows publishing a config file to adjust appearance, expiration, and other parameters without touching core code, as explained under the 'Configuration' section with custom settings.
Requires PHP's GD extension and specific Windows DLLs like php_gd2.dll, which can complicate installation in some environments, as noted in the README's installation notes.
Lacks modern CAPTCHA features like audio challenges, invisible CAPTCHAs, or behavioral analysis, limiting its effectiveness against sophisticated bots compared to services like reCAPTCHA.
Generating CAPTCHA images on-the-fly for every request may slow down high-traffic sites, as it relies on server-side rendering without built-in caching or CDN options.