Laravel Recaptcha Validation: Validate human users using Recaptcha API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-03-16 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 25 All time: 10,318 This week: 259Up
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  
Name: Isa Eken <contact>
Classes: 11 packages by
Country: Turkey Turkey
Innovation award
Innovation award
Nominee: 7x

Details

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  
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

  Files folder image Files  /  src  
File Role Description
Files folder imageconfig (1 file)
Files folder imageFacades (1 file)
Files folder imageHttp (1 directory)
Files folder imageroutes (1 file)
  Plain text file Recaptcha.php Class Class source
  Plain text file RecaptchaServiceProvider.php Class Class source

  Files folder image Files  /  src  /  config  
File Role Description
  Plain text file recaptcha.php Aux. Auxiliary script

  Files folder image Files  /  src  /  Facades  
File Role Description
  Plain text file Recaptcha.php Class Class source

  Files folder image Files  /  src  /  Http  
File Role Description
Files folder imageControllers (1 file)

  Files folder image Files  /  src  /  Http  /  Controllers  
File Role Description
  Plain text file RecaptchaController.php Class Class source

  Files folder image Files  /  src  /  routes  
File Role Description
  Plain text file web.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:25
This week:0
All time:10,318
This week:259Up
For more information send a message to info at phpclasses dot org.