PHP code example of hamog / captcha

1. Go to this page and download the library: Download hamog/captcha 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/ */

    

hamog / captcha example snippets


'providers' => [
    // ...
    Hamog\Captcha\CaptchaServiceProvider::class,
]

'aliases' => [
    // ...
    'Captcha' => Hamog\Captcha\Facades\Captcha::class,
]

return [
    'width'         => 170,
    'height'        => 60,
    'font_color'    => '#1A3EA1', //only hexadecimal
    'size'          => 22,
    'length'        => 6,
    'sensitive'     => false,
];

{!! Captcha::create() !!}

//Or
{!! captcha() !!}

{!! Captcha::img() !!}

//Or
{!! captcha_img() !!}

{!! Captcha::src() !!}

//Or
{!! captcha_src() !!}

'captcha'   => '

'captcha' => 'The :attribute is invalid',

php artisan vendor:publish --provider="Hamog\Captcha\CaptchaServiceProvider"