Skip to content

Commit 1cd6345

Browse files
committed
Fix store and update callback.
1 parent e6ff1e9 commit 1cd6345

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Fields/Field.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function fillAttribute(RestifyRequest $request, $model, int $bulkRow = nu
226226
}
227227

228228
if ($request->isStoreRequest() && is_callable($this->storeCallback)) {
229-
return call_user_func(
229+
return $model->{$this->attribute} = call_user_func(
230230
$this->storeCallback, $request, $model, $this->attribute, $bulkRow
231231
);
232232
}
@@ -238,7 +238,7 @@ public function fillAttribute(RestifyRequest $request, $model, int $bulkRow = nu
238238
}
239239

240240
if ($request->isUpdateRequest() && is_callable($this->updateCallback)) {
241-
return call_user_func(
241+
return $model->{$this->attribute} = call_user_func(
242242
$this->updateCallback, $request, $model, $this->attribute, $bulkRow
243243
);
244244
}

0 commit comments

Comments
 (0)