From 229a369b01c9137614143471fccd7a0b40482148 Mon Sep 17 00:00:00 2001 From: Adrian Mejias Date: Sun, 26 Jun 2022 00:56:30 -0500 Subject: [PATCH] wip --- .ide-helper.php | 2 ++ config/olark.php | 18 ++++++++++++++++++ src/Olark.php | 4 ++-- src/helpers.php | 2 -- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.ide-helper.php b/.ide-helper.php index 418084a..a5302be 100644 --- a/.ide-helper.php +++ b/.ide-helper.php @@ -14,4 +14,6 @@ class Olark extends \AdrianMejias\Olark\Facades\OlarkFacade { } class OlarkFacade extends \AdrianMejias\Olark\Olark { } class OlarkException extends \Exception { } +class OlarkSiteIdException extends \AdrianMejias\Olark\Exceptions\OlarkSiteIdException { } +class OlarkDisabledException extends \AdrianMejias\Olark\Exceptions\OlarkDisabledException {} class OlarkServiceProvider extends \Illuminate\Support\ServiceProvider { } diff --git a/config/olark.php b/config/olark.php index d3a9cd5..0b23544 100644 --- a/config/olark.php +++ b/config/olark.php @@ -4,8 +4,26 @@ return [ + /* + |-------------------------------------------------------------------------- + | Olark Status + |-------------------------------------------------------------------------- + | + | Here you can configure Olark status. + | + */ + 'enable' => env('OLARK_ENABLE', true), + /* + |-------------------------------------------------------------------------- + | Site Id + |-------------------------------------------------------------------------- + | + | Here you can configure Olark site id. + | + */ + 'site_id' => env('OLARK_SITE_ID', ''), ]; diff --git a/src/Olark.php b/src/Olark.php index 31bcd46..5aee669 100644 --- a/src/Olark.php +++ b/src/Olark.php @@ -100,7 +100,7 @@ public function disable() */ public function isEnabled(): bool { - return config('olark.enable', false) === true; + return config('olark.enable', true) === true; } /** @@ -110,7 +110,7 @@ public function isEnabled(): bool */ public function isDisabled(): bool { - return config('olark.enable', false) === false; + return config('olark.enable', true) === false; } /** diff --git a/src/helpers.php b/src/helpers.php index 889a2a1..e3be2d1 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -2,8 +2,6 @@ declare(strict_types=1); -namespace AdrianMejias\Olark; - if (! function_exists('olark')) { /** * Get the Olark instance.