Skip to content

Commit 9cb00d8

Browse files
authored
Add block append after param
1 parent 782bb84 commit 9cb00d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Endpoints/Block.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function children(): BlockCollection
8181
*
8282
* @throws HandlingException
8383
*/
84-
public function append($appendices): BlockEntity
84+
public function append($appendices, $after = ""): BlockEntity
8585
{
8686
if (! is_array($appendices) && ! $appendices instanceof BlockEntity) {
8787
throw new HandlingException('$appendices must be an array or instance of BlockEntity');
@@ -104,6 +104,10 @@ public function append($appendices): BlockEntity
104104
'children' => $children,
105105
];
106106

107+
if ($after) {
108+
$body['after'] = $after;
109+
}
110+
107111
$response = $this->patch(
108112
$this->url(Endpoint::BLOCKS.'/'.$this->blockId.'/children'.''),
109113
$body

0 commit comments

Comments
 (0)