mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-09-04 04:35:33 +01:00
Add more conditions
This commit is contained in:
parent
d5d9f72375
commit
654457beee
2 changed files with 102 additions and 5 deletions
|
@ -13,12 +13,50 @@ class Filter
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function hasNot($value)
|
||||
{
|
||||
$this->properties['doesNotHaveTheWord'] = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function from()
|
||||
{
|
||||
$this->properties['from'] = collect(func_get_args())
|
||||
->map(function ($address) {
|
||||
return trim($address);
|
||||
})->implode(',');
|
||||
})->all();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function to()
|
||||
{
|
||||
$this->properties['to'] = collect(func_get_args())
|
||||
->map(function ($address) {
|
||||
return trim($address);
|
||||
})->all();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function subject($subject)
|
||||
{
|
||||
$this->properties['subject'] = $subject;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function hasAttachment()
|
||||
{
|
||||
$this->properties['hasAttachment'] = 'true';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function excludeChats()
|
||||
{
|
||||
$this->properties['excludeChats'] = 'true';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue