A Laravel service provider package that integrates customizable CAPTCHA functionality to enhance authentication security.
Captcha for Laravel 5+
This tool is used by Laravel developers to add CAPTCHA verification to their web applications, helping prevent automated bots from abusing authentication forms. It supports multiple Laravel versions and provides both session-based and stateless CAPTCHA modes for flexible integration.
Ensure required PHP extensions (GD2, fileinfo, mbstring) are enabled, especially on Windows. Use the published config file to customize CAPTCHA appearance and behavior. Laravel 11+ simplifies setup by auto-registering aliases.
Require the package via composer: composer require mews/captcha
For Laravel 5, set minimum-stability to dev in composer.json if needed
Update or install packages with composer update or composer install
Enable php_gd2.dll, php_fileinfo.dll, and php_mbstring.dll extensions in php.ini on Windows
Register the CaptchaServiceProvider in config/app.php under 'providers'
Add the Captcha facade alias in config/app.php under 'aliases' (Laravel 5.1+)
For Laravel 11+, add provider to bootstrap/providers.php and alias is auto-added
Publish configuration with php artisan vendor:publish --provider="Mews\Captcha\CaptchaServiceProvider"
composer require mews/captcha
Installs the Captcha package via Composer.
'providers' => [ Mews\Captcha\CaptchaServiceProvider::class]
Registers the Captcha service provider in Laravel.
'aliases' => [ 'Captcha' => Mews\Captcha\Facades\Captcha::class]
Adds the Captcha facade alias for easy access.
php artisan vendor:publish --provider="Mews\Captcha\CaptchaServiceProvider"
Publishes the package configuration file to customize settings.