Skip to content

Commit 3c2123c

Browse files
committed
Make computed as readonly.
1 parent b766044 commit 3c2123c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Fields/Field.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public function __construct($attribute, callable $resolveCallback = null)
139139
if ($attribute instanceof Closure || (is_callable($attribute) && is_object($attribute))) {
140140
$this->computedCallback = $attribute;
141141
$this->attribute = 'Computed';
142+
$this->readonly();
142143
} else {
143144
$this->attribute = $attribute ?? str_replace(' ', '_', Str::lower($attribute));
144145
}

0 commit comments

Comments
 (0)