Commit 3302fba2 authored by Nguyễn Văn Ánh's avatar Nguyễn Văn Ánh

Merge pull request #4 from Stichoza/patch-1

Add more examples for Laravel 5
parents b2f507d6 e60bc671
...@@ -46,19 +46,38 @@ return array( ...@@ -46,19 +46,38 @@ return array(
### Usage ### Usage
Display reCAPTCHA: ##### Display reCAPTCHA
Insert reCAPTCHA inside your form using one of this examples:
For Laravel 4
```php ```php
<?php echo Form::open() ?> <?php echo Form::captcha() ?>
````
<?php echo Form::captcha() ?> For Laravel 4 using Blade syntax
// <?php app('captcha')->display(); // for Laravel 5 ?> ```php
{{ Form::captcha() }}
```
<?php echo Form::submit() ?> For Laravel 5
<?php echo Form::close() ?> ```php
<?php echo app('captcha')->display(); ?>
``` ```
Validate, add `'g-recaptcha-response' => 'required|captcha'` to rules array. For Laravel 5 using Blade syntax
```php
{!! app('captcha')->display(); !!}
```
For Laravel 5 with `illuminate/html` package using Blade syntax
```php
{!! Form::captcha() !!}
```
##### Validation
Add `'g-recaptcha-response' => 'required|captcha'` to rules array.
```php ```php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment