Skip to content

Commit

Permalink
Merge pull request #14 from royduin/patch-1
Browse files Browse the repository at this point in the history
Nullable support
  • Loading branch information
dillingham authored Sep 16, 2020
2 parents ce9efc2 + 16a056d commit c93dc29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function resolve($resource, $attribute = null)
parent::resolve($resource, $attribute);

$this->fillUsing(function($request, $model, $attribute, $requestAttribute) {
$model->$attribute = json_decode($request->$attribute, true);
$model->$attribute = $this->isNullValue($request->$attribute) ? null : json_decode($request->$attribute, true);
});

$this->withMeta([
Expand Down

0 comments on commit c93dc29

Please sign in to comment.