Skip to content

Commit 022be22

Browse files
authored
Add columns parameter to button function
1 parent 1401eb2 commit 022be22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TelegramMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ public function content($content)
7171
*
7272
* @return $this
7373
*/
74-
public function button($text, $url)
74+
public function button($text, $url, $columns = 2)
7575
{
7676
$this->buttons[] = compact('text', 'url');
7777

78-
$replyMarkup['inline_keyboard'] = array_chunk($this->buttons, 2);
78+
$replyMarkup['inline_keyboard'] = array_chunk($this->buttons, $columns);
7979
$this->payload['reply_markup'] = json_encode($replyMarkup);
8080

8181
return $this;

0 commit comments

Comments
 (0)