We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1401eb2 + 022be22 commit 9c58631Copy full SHA for 9c58631
src/TelegramMessage.php
@@ -71,11 +71,11 @@ public function content($content)
71
*
72
* @return $this
73
*/
74
- public function button($text, $url)
+ public function button($text, $url, $columns = 2)
75
{
76
$this->buttons[] = compact('text', 'url');
77
78
- $replyMarkup['inline_keyboard'] = array_chunk($this->buttons, 2);
+ $replyMarkup['inline_keyboard'] = array_chunk($this->buttons, $columns);
79
$this->payload['reply_markup'] = json_encode($replyMarkup);
80
81
return $this;
0 commit comments