2017 © Pedro Peláez
 

package laravel_captcha

CAPTCHA For Laravel.

image

andreibu/laravel_captcha

CAPTCHA For Laravel.

  • Wednesday, March 1, 2017
  • by AndreiBu
  • Repository
  • 1 Watchers
  • 1 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

CAPTCHA

Installation

composer require andreibu/laravel_captcha

Laravel 5

Setup

Add ServiceProvider to the providers array in config/app.php., (*1)


'providers' => [ ... AndreiBu\laravel_captcha\CaptchaServiceProvider::class, ], 'aliases' => [ ... 'Captcha' => AndreiBu\laravel_captcha\Facades\Captcha::class, ],

Add Route to reload captcha routes/web.php., (*2)

    Route::get('/captcha/{key?}', function($key='') {
        $json=array('img'=>Captcha::img($key),'key'=>Captcha::md5());
        return json_encode($json);
    });    

Configuration

you must copy in /public/fonts/ ttf font and specify its path in the configuration CAPTCHA_FONT, (*3)

(optional) Add key in .env file (without brackets):, (*4)

    CAPTCHA_MIN=[0-999 999 999]
    CAPTCHA_MAX=[0-999 999 999]
    CAPTCHA_WIDTH=[0-1000]
    CAPTCHA_HEIGHT=[0-1000]
    CAPTCHA_TIME=[60-3600]
    CAPTCHA_GARBAGE=[0-100]
    CAPTCHA_REDRAW=[1-10]
    CAPTCHA_FONT='/fonts/times.ttf'

Usage

create CAPTCHA cod
          {!! Captcha::create_cod(); !!}
          or
          {!! app('captcha')->create_cod(); !!}

display CAPTCHA
        {!! Captcha::create_cod(); !!}
        <input name="captcha_md5" type="hidden" value="{!! Captcha::md5(); !!}">
        <input name="captcha_cod" type="text" value="">
        {!! Captcha::img(); !!}

display CAPTCHA + reload


@if ($errors->has('captcha_cod')) {{ $errors->first('captcha_cod') }} @endif {!! Captcha::create_cod(); !!} {!! Captcha::img(); !!} reload
Validation

Add 'captcha_cod' => 'required|captcha' to rules array., (*5)

$validate = Validator::make(Input::all(), [
    'captcha_cod' => 'required|captcha'
]);

Contribute

https://github.com/AndreiBu/laravel_captcha/pulls, (*6)

The Versions

01/03 2017

dev-master

9999999-dev

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

01/03 2017

1.6.6

1.6.6.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

01/03 2017

1.6.5

1.6.5.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

01/03 2017

1.6.4

1.6.4.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

28/02 2017

1.6.3

1.6.3.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

28/02 2017

1.6.2

1.6.2.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

28/02 2017

1.6.1

1.6.1.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

23/02 2017

1.6

1.6.0.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

23/02 2017

1.5

1.5.0.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

16/02 2017

1.4.1

1.4.1.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

15/02 2017

1.3

1.3.0.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

15/02 2017

0.2

0.2.0.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

15/02 2017

1.2

1.2.0.0

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

  • php >=5.3.23

 

by Avatar AndreiBu

laravel captcha laravel5

15/02 2017

dev-dev

dev-dev

CAPTCHA For Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar AndreiBu

laravel captcha laravel5