Laravel package to generate and validate CAPTCHA.
nikazooz/laravel-captcha is a Laravel package for laravel package to generate and validate captcha..
It currently has 0 GitHub stars and 4.272 downloads on Packagist (latest version v1.7.0).
Install it with composer require nikazooz/laravel-captcha.
Discover more Laravel packages by nikazooz
or browse all Laravel packages to compare alternatives.
Last updated
Package for Laravel to easily generate and validate CAPTCHA.
| Version | PHP | Laravel | Status | | ------- | ----- | ------- | ------------- | | 0.1.* | >=7.0 | ^5.5 | Not supported | | 1.* | >=7.2 | >=6.0 | Supported |
ImageMagick or GD extension for PHP is required to use with included drivers.
Verification code is stored in session, so session needs to be active on validated route and on web middleware group.
composer require nikazooz/laravel-captcha
To change configurations, you need to publish the configurations file.
php artisan vendor:publish --provider="Nikazooz\LaravelCaptcha\CaptchaServiceProvider"
Reading the config file is the best way to find out what can be configured.
Easily get URL at which CAPTCHA image is available using the facade:
<?php
use Nikazooz\LaravelCaptcha\Facades\Captcha;
echo Captcha::url();
It adds
vquery parameter with random value in order to avoid browser caching.
To validate the code sent in request, use captcha validator, registered by the package, on that parameter.
If you need the verification code, for example in tests, you can get it with the facade: Captcha::code();
The package is open-sourced software licensed under the MIT license.