diff --git a/README.md b/README.md index bd6d559..f8515fe 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/Recaptcha.php b/src/Recaptcha.php index bdd76db..427620b 100644 --- a/src/Recaptcha.php +++ b/src/Recaptcha.php @@ -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'; } diff --git a/src/RecaptchaServiceProvider.php b/src/RecaptchaServiceProvider.php index ceae41d..af0316f 100644 --- a/src/RecaptchaServiceProvider.php +++ b/src/RecaptchaServiceProvider.php @@ -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() {