Skip to content

Commit 7493759

Browse files
committed
Seperate Laravel support
1 parent 64bafa7 commit 7493759

File tree

5 files changed

+4
-166
lines changed

5 files changed

+4
-166
lines changed

composer.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fruitcakestudio/recaptcha",
33
"description": "reCAPTCHA library",
4-
"keywords": ["reCAPTCHA", "captcha", "no captcha", "nocaptcha", "spam", "laravel"],
4+
"keywords": ["reCAPTCHA", "captcha", "no captcha", "nocaptcha", "spam"],
55
"license": "MIT",
66
"authors": [
77
{
@@ -18,13 +18,9 @@
1818
"FruitcakeStudio\\ReCaptcha\\": "src/"
1919
}
2020
},
21-
"require-dev": {
22-
"symfony/http-foundation": "~2.3",
23-
"laravel/support": "~4.0"
24-
},
2521
"extra": {
2622
"branch-alias": {
27-
"dev-master": "0.2-dev"
23+
"dev-master": "0.3-dev"
2824
}
2925
}
3026
}

readme.md

+2-37
Original file line numberDiff line numberDiff line change
@@ -78,42 +78,7 @@ See the docs on https://developers.google.com/recaptcha/docs/verify
7878

7979
## Laravel integration
8080

81-
You can use the Laravel ServiceProvider to make use of the Laravel Configuration and Request object.
81+
Since 0.3.x, Laravel integration is supported with a standalone package: https://github.com/fruitcakestudio/laravel-recaptcha
8282

83-
Add the ServiceProvider to your list of ServiceProviders:
84-
85-
```
86-
'FruitcakeStudio\ReCaptcha\Support\Laravel\ServiceProvider',
87-
```
88-
89-
Publish the Configuration and edit the sitekey, secret and language.
90-
91-
```
92-
php artisan config:publish fruitcakestudio/recaptcha
93-
```
94-
95-
If you want to use the Facade, add that too.
96-
97-
```
98-
'ReCaptcha' => 'FruitcakeStudio\ReCaptcha\Support\Laravel\Facade',
99-
```
100-
101-
This will register the ReCaptcha instance, preconfigured with your configuration and the Request object.
102-
103-
```php
104-
// Using the IoC container
105-
$captcha = App::make('recaptcha');
106-
$captcha->getScript();
107-
108-
// Using the Facade
109-
ReCaptcha::verifyRequest();
110-
```
111-
112-
You can also add the ReCaptcha as a rule to the validator:
113-
114-
```php
115-
$validator = Validator::make(Input::all(), array(
116-
'g-recaptcha-response' => 'required|recaptcha'
117-
));
118-
```
83+
The classes are the same, only the configuration package name is 'laravel-recaptcha' instead of 'recaptcha'.
11984

src/Support/Laravel/Facade.php

-22
This file was deleted.

src/Support/Laravel/ServiceProvider.php

-67
This file was deleted.

src/config/config.php

-34
This file was deleted.

0 commit comments

Comments
 (0)