Using chunk method for every row #174
Answered
by
fabio-ivona
abduqodirovshukrullo
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
fabio-ivona
Sep 15, 2022
Replies: 1 comment 1 reply
-
Hi, a better approach could be to use the $specialitieKeyboards = [];
foreach (specialities as $specialitiy) {
$specialitieKeyboards[] = ReplyButton::make($specialitiy->name)->webApp('google.com')->width(0.5);
}
Telegraph::message('<b>Message</b>')
->replyKeyboard(ReplyKeyboard::make()
->button('◀️button')->width(1)
->button('🔙button')->width(1)
->buttons($specialitieKeyboards)
->button('◀️button')->width(1)
->button('🔙button')->width(1)
)->send(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fabio-ivona
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, a better approach could be to use the
width
method of buttons: