Feat: Delete unused private keys button

This commit is contained in:
peaklabs-dev
2024-09-19 19:27:25 +02:00
parent fc6f5d82db
commit dbc723089b
5 changed files with 49 additions and 35 deletions

View File

@@ -218,4 +218,11 @@ class PrivateKey extends BaseModel
return $query->exists();
}
public static function cleanupUnusedKeys()
{
self::all()->each(function ($privateKey) {
$privateKey->safeDelete();
});
}
}