From 9a0d4f8a9031e36d57b81ce8466a3bf06a038b18 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 24 Sep 2016 19:57:11 +0100 Subject: [PATCH] Add labelAndArchive method --- src/GmailFilter.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/GmailFilter.php b/src/GmailFilter.php index bb8cad1..91e9887 100644 --- a/src/GmailFilter.php +++ b/src/GmailFilter.php @@ -117,6 +117,21 @@ class GmailFilter return $this; } + /** + * Label and archive a message. + * + * @param string $label + * The label to assign. + * + * @return $this + */ + public function labelAndArchive($label) + { + $this->label($label)->archive(); + + return $this; + } + /** * @return $this */