Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 3e0fa4e

Browse files
authored
Merge pull request #15 from andrewgorpenko/master
Use .env for sensitive information
2 parents 7f73149 + c962902 commit 3e0fa4e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ php artisan vendor:publish --provider="Biscolab\ReCaptcha\ReCaptchaServiceProvid
3636
## Configuration
3737

3838
### Add your API Keys
39-
Open `config/recaptcha.php` configuration file and set `api_site_key`, `api_secret_key` and `version`:
39+
Open `.env` file and set `RECAPTCHA_SITE_KEY` and `RECAPTCHA_SECRET_KEY`:
40+
```php
41+
RECAPTCHA_SITE_KEY=YOUR_API_SITE_KEY
42+
RECAPTCHA_SECRET_KEY=YOUR_API_SECRET_KEY
43+
```
44+
45+
Open `config/recaptcha.php` configuration file and set `version`:
4046
```php
4147
return [
42-
'api_site_key' => 'YOUR_API_SITE_KEY',
43-
'api_secret_key' => 'YOUR_API_SECRET_KEY',
48+
'api_site_key' => env('RECAPTCHA_SITE_KEY', ''),
49+
'api_secret_key' => env('RECAPTCHA_SECRET_KEY', ''),
4450
'version' => 'v2' // supported: v2|invisible
4551
'skip_ip' => [] // array of IP addresses - String: dotted quad format e.g.: 127.0.0.1
4652
];

config/recaptcha.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
* get site key @ www.google.com/recaptcha/admin
2020
*
2121
*/
22-
'api_site_key' => '',
22+
'api_site_key' => env('RECAPTCHA_SITE_KEY', ''),
2323

2424
/**
2525
*
2626
* The secret key
2727
* get secret key @ www.google.com/recaptcha/admin
2828
*
2929
*/
30-
'api_secret_key' => '',
30+
'api_secret_key' => env('RECAPTCHA_SECRET_KEY', ''),
3131

3232
/**
3333
*

0 commit comments

Comments
 (0)