anandpilania / laravel-captcha
Captcha validation package for laravel.
v1.0.1
2017-08-04 11:42 UTC
Requires
- illuminate/support: 5.4.*
This package is auto-updated.
Last update: 2024-12-13 04:10:01 UTC
README
Captcha package for laravel, that can be embeded in any website as widget
.
How to use
- Install :
composer install anandpilania/laravel-captcha
- Register
ServiceProvider
ORFacade
:AP\Captcha\ServiceProvider::class
"Captcha" => AP\Captcha\Facade::class
IF USING DIRECTLY IN LARAVEL PROJECT
- Add
captcha
attribute to theview
:Captcha::build()
build
method accepts two parameters 1-int - length
of thecaptcha value
, 2-boolean - html
: if passedtrue
, returns the default html contianer else return thecode
(default: false)
- Add
validation field
to your specificcontroller
:"captcha_code" => "captcha"
IF USING AS WIDGET
- Call the
route
: GET: //HOSTNAME/captcha/widget (optionally can pall theint : length
parameter as //HOSTNAME/captcha/widget/6) - Refresh the code via calling : GET: //HOSTNAME/captcha/refresh
- Verify it via calling : GET: //HOSTNAME/captcha/verify