diff --git a/formwidgets/Blocks.php b/formwidgets/Blocks.php index 04b2391..2c9216e 100644 --- a/formwidgets/Blocks.php +++ b/formwidgets/Blocks.php @@ -331,9 +331,14 @@ protected function processInspectorConfig(array $config): array 'span', ])); - if (isset($defined['options']) && is_array($defined['options'])) { - foreach ($defined['options'] as $key => &$value) { - $value = Lang::get($value); + if (isset($defined['options'])) { + if (is_array($defined['options'])) { + foreach ($defined['options'] as $key => &$value) { + $value = Lang::get($value); + } + } elseif (is_callable($defined['options'])) { + $callable = $defined['options']; + $defined['options'] = $callable($property); } }