No CAPTCHA reCAPTCHA [![Build Status](https://travis-ci.org/anhskohbo/no-captcha.svg?branch=master&style=flat-square)](https://travis-ci.org/anhskohbo/no-captcha)
With [language support](https://developers.google.com/recaptcha/docs/language) or [onloadCallback](https://developers.google.com/recaptcha/docs/display#explicit_render) option :
With [custom attributes](https://developers.google.com/recaptcha/docs/display#render_param)(theme, size, callback ...) :
```php
{!!NoCaptcha::display(['data-theme'=>'dark'])!!}
```
```
##### Validation
#### Validation
Add `'g-recaptcha-response' => 'required|captcha'` to rules array.
Add `'g-recaptcha-response' => 'required|captcha'` to rules array :
```php
```php
$validate=Validator::make(Input::all(),[
$validate=Validator::make(Input::all(),[
'g-recaptcha-response'=>'required|captcha'
'g-recaptcha-response'=>'required|captcha'
]);
]);
```
```
### Testing
##### Custom Validation Message
When using the [Laravel Testing functionality](http://laravel.com/docs/5.1/testing), you will need to mock out the response for the captcha form element. To do this:
Add the following values to the `custom` array in the `validation` language file :
1) Setup NoCaptcha facade in config/app.conf
```php
'custom'=>[
'g-recaptcha-response'=>[
'required'=>'Please verify that you are not a robot.',
'captcha'=>'Captcha error! try again later or contact site admin.',
2) For any form tests involving the captcha, you can then mock the facade behaviour:
### Testing
When using the [Laravel Testing functionality](http://laravel.com/docs/5.5/testing), you will need to mock out the response for the captcha form element.
So for any form tests involving the captcha, you can do this by mocking the facade behavior:
```php
```php
// prevent validation error on captcha
// prevent validation error on captcha
NoCaptcha::shouldReceive('verifyResponse')
NoCaptcha::shouldReceive('verifyResponse')
->once()
->once()
->andReturn(true);
->andReturn(true);
// provide hidden input for your 'required' validation
// provide hidden input for your 'required' validation