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 echo Form::captcha() ?>
````
For Laravel 4 using Blade syntax
```php
{{ Form::captcha() }}
```
For Laravel 5
```php ```php
<?php echo Form::open() ?> <?php echo app('captcha')->display(); ?>
```
<?php echo Form::captcha() ?>
// <?php app('captcha')->display(); // for Laravel 5 ?> For Laravel 5 using Blade syntax
```php
{!! app('captcha')->display(); !!}
```
<?php echo Form::submit() ?> For Laravel 5 with `illuminate/html` package using Blade syntax
<?php echo Form::close() ?> ```php
{!! Form::captcha() !!}
``` ```
Validate, add `'g-recaptcha-response' => 'required|captcha'` to rules array. ##### 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