This package is captcha based on cool-php-captcha 0.3.1. It provides simple call usage and validation.
suitmedia/captcha is a Laravel package for this package is captcha based on cool-php-captcha 0.3.1. it provides simple call usage and validation..
It currently has 0 GitHub stars and 144 downloads on Packagist (latest version 1.3.2).
Install it with composer require suitmedia/captcha.
Discover more Laravel packages by suitmedia
or browse all Laravel packages to compare alternatives.
Last updated
Simple image captcha based on cool-php-captcha v0.3.1.
Support for Laravel 5. For Laravel 4, use version 1.1.1.
Url captcha image now have random number on query string
Added Captcha::isValid($value) for checking captcha session.
Firstly, you need to add the package to the require attribute of your composer.json file:
{
"require" : {
"wicochandra/captcha": "1.*"
}
}
Now, run composer update from command line to install the package.
Then, update your config/app.php by adding new value to the providers and alias key:
'providers' => array (
//...
'Wicochandra\Captcha\CaptchaServiceProvider'
),
//...
'aliases' => array (
//...
'Captcha' => 'Wicochandra\Captcha\Facade\Captcha',
),
Lastly, you need to publish vendor assets
php artisan vendor:publish
There are two main usage of the package.
//Will return http://[web url]/captcha/image
Captcha::url();
captcha validator or Captcha::isValid($value) to validate whether the input is match with the captcha image or not. $rules = array(
'[input name]' => 'captcha'
);
Captcha::isValid('captcha-input'); //return true if valid. Otherwise return false
Note: You have to define validation error message for captcha by yourself on resources/lang/{locale}/validation.php