Fix API key generation

This commit is contained in:
Toby Zerner 2018-07-21 17:14:15 +09:30
parent f52d5f2ccf
commit bcd74ff09b

View File

@ -31,8 +31,10 @@ class ApiKey extends AbstractModel
*/ */
public static function generate() public static function generate()
{ {
return new static([ $key = new static;
'id' => str_random(40)
]); $key->key = str_random(40);
return $key;
} }
} }