PHP code example of elic-dev / laravel-math-captcha

1. Go to this page and download the library: Download elic-dev/laravel-math-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/ */

    

elic-dev / laravel-math-captcha example snippets


{{ app('mathcaptcha')->label() }}
{!! app('mathcaptcha')->input() !!}

$this->validate($request, [
    'mathcaptcha' => '

app('mathcaptcha')->reset();

<div class="form-group">
    <label for="mathgroup">Please solve the following math function: {{ app('mathcaptcha')->label() }}</label>
    {!! app('mathcaptcha')->input(['class' => 'form-control', 'id' => 'mathgroup']) !!}
    @if ($errors->has('mathcaptcha'))
        <span class="help-block">
            <strong>{{ $errors->first('mathcaptcha') }}</strong>
        </span>
    @endif
</div>

php artisan vendor:publish --provider="ElicDev\MathCaptcha\MathCaptchaServiceProvider" --tag=config

php artisan vendor:publish --provider="ElicDev\MathCaptcha\MathCaptchaServiceProvider" --tag=lang