Skip to content

geekk-net/multi-captcha-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

multi-captcha-laravel

Laravel's integration for package geekk/multi-captcha

Installation

Install package:

composer require geekk/multi-captcha-laravel

Create configuration file:

php artisan vendor:publish --provider="Geekk\MultiCaptcha\Laravel\CaptchaServiceProvider" --tag="config"

Fill driver's specific setting in it:

'recaptcha2' => [
        'driver' => 'recaptcha2',
        'site_key' => 'your site key for reCaptcha v2',
        'secret_key' => 'your secret key for reCaptcha v2'
    ],

Using

Get CaptchaManager from Laravel's dependency container:

use Geekk\MultiCaptcha\Laravel\CaptchaManager;

$captchaManager = app(CaptchaManager::class)

$captcha = $captchaManager->getCaptcha();

// Render captcha in template
echo $captcha->render();

// Verify user's response
$result = $captcha->verify($captchaManager->getRequest($request));

Customising captcha's view

Use css for a customizing.

For captcha's templates generated on frontend side you can get data from method CaptchaInterface::getViewData().

About

geekk-net/multi-captcha integration for laravel

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages