From 22fadb7f9cd83984607b0f6c0702541f4d5c2a58 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 21 Jul 2018 17:14:15 +0930 Subject: [PATCH] Fix API key generation --- src/Api/ApiKey.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Api/ApiKey.php b/src/Api/ApiKey.php index ffd8d591c..e8ebb48ec 100644 --- a/src/Api/ApiKey.php +++ b/src/Api/ApiKey.php @@ -31,8 +31,10 @@ class ApiKey extends AbstractModel */ public static function generate() { - return new static([ - 'id' => str_random(40) - ]); + $key = new static; + + $key->key = str_random(40); + + return $key; } }