Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
no-captcha
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CENTER-TBI
no-captcha
Commits
ef5af5ff
Commit
ef5af5ff
authored
Jan 27, 2015
by
Nguyen Van Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
1fc0dd54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
20 deletions
+4
-20
README.md
README.md
+4
-20
No files found.
README.md
View file @
ef5af5ff
...
@@ -29,7 +29,7 @@ Add ServiceProvider to the providers array in `app/config/app.php`.
...
@@ -29,7 +29,7 @@ Add ServiceProvider to the providers array in `app/config/app.php`.
```
```
### Configuration
### Configuration
Run
`php artisan config:publish anhskohbo/no-captcha`
(
`publish:config`
if you use Laravel 5)
.
Run
`php artisan config:publish anhskohbo/no-captcha`
.
Fill secret and sitekey config in
`app/config/packages/anhskohbo/no-captcha/config.php`
file:
Fill secret and sitekey config in
`app/config/packages/anhskohbo/no-captcha/config.php`
file:
...
@@ -60,21 +60,6 @@ For Laravel 4 using Blade syntax
...
@@ -60,21 +60,6 @@ For Laravel 4 using Blade syntax
{{ Form::captcha() }}
{{ Form::captcha() }}
```
```
For Laravel 5
```php
<?php echo app('captcha')->display(); ?>
```
For Laravel 5 using Blade syntax
```php
{!! app('captcha')->display(); !!}
```
For Laravel 5 with `
illuminate/html
` package using Blade syntax
```php
{!! Form::captcha() !!}
```
##### Validation
##### Validation
Add `
'g-recaptcha-response' => 'required|captcha'
` to rules array.
Add `
'g-recaptcha-response' => 'required|captcha'
` to rules array.
...
@@ -87,7 +72,6 @@ $validate = Validator::make(Input::all(), [
...
@@ -87,7 +72,6 @@ $validate = Validator::make(Input::all(), [
```
```
## Without Laravel
## Without Laravel
Checkout example below:
Checkout example below:
...
@@ -97,9 +81,9 @@ Checkout example below:
...
@@ -97,9 +81,9 @@ Checkout example below:
require_once "vendor/autoload.php";
require_once "vendor/autoload.php";
$secret = ''
;
use Anhskohbo\NoCaptcha\NoCaptcha
;
$sitekey = '';
$captcha = new
\Anhskohbo\NoCaptcha\NoCaptcha($secret, $sitekey
);
$captcha = new
NoCaptcha('[secret]', '[sitekey]'
);
if ( ! empty($_POST)) {
if ( ! empty($_POST)) {
var_dump($captcha->verifyResponse($_POST['g-recaptcha-response']));
var_dump($captcha->verifyResponse($_POST['g-recaptcha-response']));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment