diff --git a/src/ApiKey.php b/src/ApiKey.php index 7923ee9..7f8eb26 100644 --- a/src/ApiKey.php +++ b/src/ApiKey.php @@ -88,4 +88,32 @@ public function isActive() { return true === $this->status; } + + /** + * Activate the current key. + * + * @return $this + */ + public function activate() + { + $this->update([ + 'status' => true, + ]); + + return $this; + } + + /** + * Revoke the current key. + * + * @return $this + */ + public function revoke() + { + $this->update([ + 'status' => false, + ]); + + return $this; + } }