Skip to content

Commit

Permalink
fix data_get
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 24, 2020
1 parent c7cbce6 commit d460374
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function toResponse($request)
$this->calculateStatus()
), function ($response) use ($request) {
$response->original = $this->resource->resource->map(function ($item) {
return data_get($item, 'resource');
return is_array($item) ? Arr::get($item, 'resource') : $item->resource;
});

$this->resource->withResponse($request, $response);
Expand Down

0 comments on commit d460374

Please sign in to comment.