16 lines
347 B
16 lines
347 B
5 months ago
|
<?php
|
||
|
|
||
|
Kirby::plugin('ucomeugo/jsonField', [
|
||
|
'fields' => [
|
||
|
'json' => [
|
||
|
// here we could define the backend logic for our field if needed
|
||
|
]
|
||
|
],
|
||
|
'fieldMethods' => [
|
||
|
'parseJSON' => function ($field) {
|
||
|
// $field->value = json_decode($field->value);
|
||
|
return json_decode($field->value, true);
|
||
|
}
|
||
|
]
|
||
|
]);
|