From 23969fb5189b47363cc2a23f9b98b036fc470ffe Mon Sep 17 00:00:00 2001 From: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com> Date: Sat, 6 Sep 2025 06:33:38 -0400 Subject: [PATCH] typo --- src/Keyable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Keyable.php b/src/Keyable.php index d5cf97a..89d286f 100644 --- a/src/Keyable.php +++ b/src/Keyable.php @@ -14,15 +14,15 @@ public function apiKeys() public function createApiKey(array $attributes = []): NewApiKey { - $planTextApiKey = ApiKey::generate(); + $plainTextApiKey = ApiKey::generate(); - $apiKey = Model::withoutEvents(function () use ($planTextApiKey, $attributes) { + $apiKey = Model::withoutEvents(function () use ($plainTextApiKey, $attributes) { return $this->apiKeys()->create([ - 'key' => hash('sha256', $planTextApiKey), + 'key' => hash('sha256', $plainTextApiKey), 'name' => $attributes['name'] ?? null, ]); }); - return new NewApiKey($apiKey, "{$apiKey->getKey()}|{$planTextApiKey}"); + return new NewApiKey($apiKey, "{$apiKey->getKey()}|{$plainTextApiKey}"); } }