mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Fix API key generation
This commit is contained in:
parent
f52d5f2ccf
commit
bcd74ff09b
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user