PHP code example of vueone / captcha-lumen

1. Go to this page and download the library: Download vueone/captcha-lumen library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vueone / captcha-lumen example snippets


    $app->register(VueOne\CaptchaLumen\CaptchaServiceProvider::class);
    class_alias('VueOne\CaptchaLumen\Facades\Captcha','Captcha');

/**
 * captcha set
 */
config(['captcha'=>
    [
        'useful_time' => 5,
        'captcha_characters' => '2346789abcdefghjmnpqrtuxyzABCDEFGHJMNPQRTUXYZ',
        'sensitive' => false,
        'login'   => [
            'length'    => 4,
            'width'     => 120,
            'height'    => 36,
            'angle'     => 10,
            'lines'     => 2,
            'quality'   => 90,
            'invert'    =>false,
            'bgImage'   =>true,
            'bgColor'   =>'#ffffff',
            'fontColors'=>['#339900','#ff3300','#9966ff','#3333ff'],
        ],
    ]
]);

public function checkCaptcha(Request $request, $type = 'default',$captchaUuid)
{
    $this->validate($request,[
        'captcha'=>'

{Domain}/captchaInfo/{type?}