Skip to content

Commit aa27837

Browse files
committed
Add latest method.
1 parent 5b08826 commit aa27837

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/TelegramUpdates.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ public function options(array $options): self
3939
return $this;
4040
}
4141

42+
public function latest(): self
43+
{
44+
$this->payload['offset'] = -1;
45+
46+
return $this;
47+
}
48+
4249
public function get(): array
4350
{
4451
$response = app(Telegram::class)->getUpdates($this->payload);

0 commit comments

Comments
 (0)