From 50817b093b65a534c7a0eb4e4d9044c8b5dc7afc Mon Sep 17 00:00:00 2001 From: RyanDaDeng <37111049+RyanDaDeng@users.noreply.github.com> Date: Fri, 28 Dec 2018 20:19:17 +1100 Subject: [PATCH] Update readme.md --- readme.md | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/readme.md b/readme.md index c289f77..8ddc28a 100644 --- a/readme.md +++ b/readme.md @@ -24,11 +24,11 @@ If you want to use v3, please go to: https://github.com/RyanDaDeng/laravel-googl -## Invisible +## Invisible - hidden -## Inline +## Invisible - Inline @@ -42,11 +42,12 @@ If you want to make your own validation rules, you have full access to modify te ## Features -- Support invisible, global and inline badge style +- Support invisible, corner and inline badge style - Support multiple reCAPTCHA on the same page for different forms - Support multiple actions to be placed on the same page - Support custom implementation on config interface - Support custom implementation on request method interface +- Support custom implementation on Template file ## Requirement @@ -89,9 +90,15 @@ And also ``` -If your Laravel framework version is >= 5.5, just run the following command to publish views and config. +If your Laravel framework version is >= 5.5, just run the following command to publish config. ```sh -$ php artisan vendor:publish --provider="TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider" +$ php artisan vendor:publish --provider="TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider" --tag=googlerecaptchav2.config +``` + +If you want to modify or customise your own template, you can publish a default view first: + +```sh +$ php artisan vendor:publish --provider="TimeHunter\LaravelGoogleReCaptchaV2\Providers\GoogleReCaptchaV2ServiceProvider" --tag=googlerecaptchav2.views ``` After installation, you should see a googlerecaptchaV2/template.blade under views folder and googlerecaptchaV2.php in your app/config folder. @@ -135,9 +142,10 @@ Include Template script in your bottom/header of your page, params should follow The backend request will receive a value for 'g-recaptcha-response', please take a look at Sample Use Case and Facade usage sections. -## Badge Display +#### Badge Display + -Inline +### Checkbox 1. Go to config file, and set ``` PHP @@ -147,10 +155,28 @@ Inline ... ] ``` -2. Badge will be displayed as inline format within the form. +2. Badge will be displayed as checkbox format within the form. + +### Invisible - inline +1. Set size as invisible +``` PHP + [ + ... + 'size' => 'invisible' + ... + ] +``` +2. Set badge as bottomright/bottomleft +``` PHP + [ + ... + 'badge' => 'inline' + ... + ] +``` -Invisible +### Invisible - hidden 1. Set size as invisible ``` PHP @@ -169,7 +195,7 @@ Invisible Terms of Service apply. ``` -Corner +### Corner 1. Set size as invisible ``` PHP @@ -205,7 +231,7 @@ You can also directly use registered service by calling the following method. - verifyResponse() which accepts the token value from your form. This return Google reCAPTCHA Response object. ``` php - GoogleReCaptchaV2::setAction($action)->verifyResponse($value, $ip=null); + GoogleReCaptchaV2::verifyResponse($value, $ip=null); ``` Example Usage