Browse Source

Default value for url

dev
Amir Reza Mehrbakhsh 5 years ago
parent
commit
b4b5f8c97a
No known key found for this signature in database GPG Key ID: 6422B6ADF1C7F4A6
3 changed files with 3 additions and 9 deletions
  1. +1
    -3
      README.md
  2. +1
    -1
      src/Recaptcha.php
  3. +1
    -5
      src/RecaptchaServiceProvider.php

+ 1
- 3
README.md View File

@ -6,14 +6,13 @@ the Public repo of the reCaptcha project.
Require the package:
```sh
$ composer require dakyaco/ketabuzz
$ composer require dakyaco/recaptcha-package
```
Add these lines to ``config/services.php``
```sh
'recaptcha' => [
'url' => env('RECAPTCHA_URL'),
'secret' => env('RECAPTCHA_SECRET'),
]
```
@ -21,7 +20,6 @@ Add these lines to ``config/services.php``
Now go to ``.env`` file and set your credentials
```sh
RECAPTCHA_URL=
RECAPTCHA_SECRET=your-secret-key
```
## How to use


+ 1
- 1
src/Recaptcha.php View File

@ -11,7 +11,7 @@ class Recaptcha {
public function __construct() {
$this->secretKey = config('services.recaptcha.secret');
$this->url = config('services.recaptcha.url');
$this->url = 'https://captcha.dakyaco.com/api/v1/validate';
}


+ 1
- 5
src/RecaptchaServiceProvider.php View File

@ -6,11 +6,7 @@ use Illuminate\Support\ServiceProvider;
class RecaptchaServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton('Recaptcha', function () {
$recaptcha = new Recaptcha();
return $recaptcha;
});
$this->app->instance('Recaptcha', new Recaptcha());
}
public function boot() {


Loading…
Cancel
Save