Commit e60bc671 authored by Levan Velijanashvili's avatar Levan Velijanashvili

Add more examples for Laravel 5

parent b2f507d6
...@@ -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