Upgrade to 3.6.2
This commit is contained in:
@@ -142,9 +142,7 @@ class BlocksField extends FieldClass
|
||||
return [
|
||||
[
|
||||
'pattern' => 'uuid',
|
||||
'action' => function () {
|
||||
return ['uuid' => uuid()];
|
||||
}
|
||||
'action' => fn () => ['uuid' => uuid()]
|
||||
],
|
||||
[
|
||||
'pattern' => 'paste',
|
||||
|
@@ -84,13 +84,11 @@ class LayoutField extends BlocksField
|
||||
|
||||
return Layout::factory([
|
||||
'attrs' => $attrs,
|
||||
'columns' => array_map(function ($width) {
|
||||
return [
|
||||
'blocks' => [],
|
||||
'id' => uuid(),
|
||||
'width' => $width,
|
||||
];
|
||||
}, $columns)
|
||||
'columns' => array_map(fn ($width) => [
|
||||
'blocks' => [],
|
||||
'id' => uuid(),
|
||||
'width' => $width,
|
||||
], $columns)
|
||||
])->toArray();
|
||||
},
|
||||
];
|
||||
|
@@ -375,10 +375,8 @@ class Form
|
||||
public function toArray(): array
|
||||
{
|
||||
$array = [
|
||||
'errors' => $this->errors(),
|
||||
'fields' => $this->fields->toArray(function ($item) {
|
||||
return $item->toArray();
|
||||
}),
|
||||
'errors' => $this->errors(),
|
||||
'fields' => $this->fields->toArray(fn ($item) => $item->toArray()),
|
||||
'invalid' => $this->isInvalid()
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user