2017 © Pedro PelĂĄez
 

library hidden-captcha

Hidden captcha for Laravel 5

image

sebastienheyd/hidden-captcha

Hidden captcha for Laravel 5

  • Monday, February 12, 2018
  • by sebastienheyd
  • Repository
  • 1 Watchers
  • 2 Stars
  • 439 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

Fully hidden captcha for Laravel without reCaptcha

Packagist Build Status StyleCI Scrutinizer Code Quality Laravel Nb downloads MIT License, (*1)

Fully hidden spam protection solution for Laravel without reCaptcha. Based on several strategies to block the vast majority of spam bots without interfering with the user experience., (*2)

How does it work?

HiddenCaptcha will use three checking rules to block spam robots :, (*3)

  • an encrypted token containing the user's IP, current session id, current user agent and a random string
  • a randomly named required field (will use the random string in the token)
  • a time limit (10 minutes by default)

The token is retrieved via an ajax call signed with sha256., (*4)

Installation

composer require sebastienheyd/hidden-captcha

Publish public assets :, (*5)

php artisan vendor:publish --tag=laravel-assets

Extra steps for Laravel < 5.5 :, (*6)

  • Add SebastienHeyd\HiddenCaptcha\HiddenCaptchaServiceProvider::class, at the end of the provider array in config/app.php
  • Add "HiddenCaptcha" => SebastienHeyd\HiddenCaptcha\Facades\HiddenCaptcha::class, at the end of the aliases array in config/app.php

Usage

In your forms, in the blade view :, (*7)

@hiddencaptcha

To check your form, add the following validation rule:, (*8)

'captcha' => 'hiddencaptcha'

Options

Changing time limits

By default, the time limits for submitting a form are 0 second minimum to 1200 seconds maximum (10 minutes). Beyond that, hiddencaptcha will not validate the form., (*9)

These limits can be changed by declaring them in the validation rule, for example:, (*10)

$rules = ['captcha' => 'hiddencaptcha:5,2400'];, (*11)

You can also publish the configuration file to edit the default time limits :, (*12)

php artisan vendor:publish --tag=captcha-config

Package update (Laravel < 8.6.9)

Hidden-captcha comes with a JS who must be publish. Since you typically will need to overwrite the assets every time the package is updated, you may use the --force flag :, (*13)

php artisan vendor:publish --tag=laravel-assets --force

To auto update assets each time package is updated, you can add this command to post-update-cmd into the file composer.json at the root of your project., (*14)

{
    "scripts": {
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --force --ansi"
        ]
    }
}

The Versions

10/02 2018

5.5.x-dev

5.5.9999999.9999999-dev

Hidden captcha for Laravel 5

  Sources   Download

MIT

The Requires

 

by Sébastien HEYD

laravel captcha

10/02 2018

1.1.0

1.1.0.0

Hidden captcha for Laravel 5

  Sources   Download

MIT

The Requires

 

by Sébastien HEYD

laravel captcha

11/04 2017

dev-master

9999999-dev

Hidden captcha for Laravel 5

  Sources   Download

MIT

by Sébastien HEYD

laravel captcha

26/01 2017

1.0.2

1.0.2.0

Hidden captcha for Laravel 5

  Sources   Download

MIT

by Sébastien HEYD

laravel captcha

05/02 2016

1.0.1

1.0.1.0

Hidden captcha for Laravel 5

  Sources   Download

MIT

by Sébastien HEYD

laravel captcha

03/02 2016

1.0

1.0.0.0

Hidden captcha for Laravel 5

  Sources   Download

MIT

by Sébastien HEYD

laravel captcha