diff --git a/src/Cloudwa.php b/src/Cloudwa.php index e441adc..406e175 100644 --- a/src/Cloudwa.php +++ b/src/Cloudwa.php @@ -40,7 +40,7 @@ public function __construct() /** * @throws ConnectionException */ - public static function fetchSharedOTPNumbers(): array|Collection + public function fetchSharedOTPNumbers(): array|Collection { return cache()->remember('cloudwa-shared-otp-numbers', 60 * 60, function () { $team = config('cloudwa.team_id'); @@ -172,7 +172,7 @@ public static function generateWaCallback(string $reference, string $code): arra { $team = config('cloudwa.team_id'); $phone = config('cloudwa.otp.shared') - ? self::fetchSharedOTPNumbers()->random(1)->first() + ? (new self)->fetchSharedOTPNumbers()->random(1)->first() : config('cloudwa.otp.number'); return [