PHP Classes

Laravel Recaptcha Validation: Validate human users using Recaptcha API

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 32 All time: 11,115 This week: 71Up
Version License PHP version Categories
laravel-recaptcha 1.0.1Custom (specified...5PHP 5, User Management, Validation
Description 

Author

This package can validate human users using Recaptcha API.

It can display form inputs to validate whether the current user accessing a page is a real human user.

The class can also perform the necessary checks after the user has submitted the form to determine if he passed the human validation using Recaptcha.

Picture of Isa Eken
  Performance   Level  
Innovation award
Innovation award
Nominee: 14x

 

Documentation

Laravel Recaptcha

installation

composer require isaeken/recaptcha

usage

frontend

blade

<form action="?" method="GET">
    @csrf
    <img src="{{ route('isaeken.recaptcha.image') }}" />
    <input type="text" name="value">
    <button submit>Check</button>
</form>

your own

public function index(Request $request)
{
    $recaptcha = new Recaptcha;
    $recaptcha->draw();
    $recaptcha->setSession();
    $recaptcha->dark(); // optional
    return $recaptcha->response();
}

backend

public function index(Request $request)
{
    $request->validate([
        'value' => 'required|recaptcha'
    ]);
    return 'ok';
}

alternative

public function index(Request $request)
{
    $validate = IsaEken\Recaptcha\Recaptcha::validate(
        $request->get('value'),
        0, // tolerance,
        false // ignore uppercase or lowercase
    );

    // or

    $validate = IsaEken\Recaptcha\Recaptcha::validateOnce(
        $request->get('value'),
        0, // tolerance,
        false // ignore uppercase or lowercase
    );
}

  Files folder image Files (9)  
File Role Description
Files folder imagesrc (2 files, 4 directories)
Plain text file composer.json Data Auxiliary data
Plain text file LICENSE Lic. License text
Plain text file readme.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:32
This week:0
All time:11,115
This week:71Up