18
18
<ol>
19
19
<li><a href="#by-row">By Row</a></li>
20
20
<li><a href="#by-button">By Button</a></li>
21
+ <li><a href="#as-stack">As Stack</a></li>
21
22
</ol>
22
23
</li>
23
24
<li><a href="#forcereply-and-replykeyboardremove">ForceReply and ReplyKeyboardRemove</a></li>
@@ -135,6 +136,8 @@ InlineKeyboardMarkup::make()
135
136
]);
136
137
```
137
138
139
+ ![ InlineKeyboard with multiple rows] ( ./docs/images/inlinekeyboard-multiple-rows.png )
140
+
138
141
#### By Button
139
142
140
143
``` php
@@ -153,11 +156,28 @@ InlineKeyboardMarkup::make()
153
156
->button(InlineKeyboardButton::make('C')->callbackData('answer-c'))
154
157
->button(InlineKeyboardButton::make('D')->callbackData('answer-d'));
155
158
```
159
+ ![ InlineKeyboard with multiline buttons] ( ./docs/images/inlinekeyboards-multiline-buttons.png )
156
160
157
161
It's up to you if you define your buttons inline like in these examples or you'd like to generate a whole row before and
158
162
pass the variable to the ` row() ` method.
159
163
160
- ** You can mix and match the ` row() ` and ` button() ` methods.**
164
+ #### As Stack
165
+
166
+ If you want to add a bunch of buttons that have a row for themselves you can use the ` stack() ` method.
167
+
168
+ ``` php
169
+ InlineKeyboardMarkup::make()
170
+ ->stack([
171
+ InlineKeyboardButton::make('Login')->loginUrl([
172
+ 'url' => 'https://example.com/login'
173
+ ]),
174
+ InlineKeyboardButton::make('Visit Homepage')->url('https://example.com')
175
+ ]);
176
+ ```
177
+
178
+ ![ InlineKeyboard with stack] ( ./docs/images/inlinekeyboard-stack.png )
179
+
180
+ ** You can mix and match the ` row() ` , ` stack() ` and ` button() ` methods as it fits your needs.**
161
181
162
182
<p align =" right " >(<a href =" #top " >back to top</a >)</p >
163
183
0 commit comments