Skip to content

Commit ac022e0

Browse files
author
Roelof Roos
authored
Merge pull request #83 from Woeler/master
Do not ignore resolve callbacks when displaying
2 parents 0204c46 + 389823b commit ac022e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NovaEditorJsField.php

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function resolveForDisplay($resource, $attribute = null)
5252

5353
$value = data_get($resource, str_replace('->', '.', $attribute), $placeholder = new \stdClass());
5454

55+
if (is_callable($this->resolveCallback)) {
56+
$value = call_user_func($this->resolveCallback, $value, $resource, $attribute);
57+
}
58+
5559
if (!$this->displayCallback) {
5660
$this->withMeta(['asHtml' => true]);
5761
$this->value = (string) NovaEditorJs::generateHtmlOutput($value);

0 commit comments

Comments
 (0)