Skip to content

Commit

Permalink
Don't cast array to array
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Lake committed Jul 30, 2019
1 parent 92f8fd5 commit a2dbbc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Middleware/ApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private function buildPayload($response, ...$options)
$payload[$dataTag] = $response->original->items()->toArray();
} elseif ($this->isPaginatedCollection($response)) {
$payload[$metaTag][$pageTag] = $this->getPaginationBlock($response->original->resource);
$payload[$dataTag] = $response->original->resource->items()->toArray();
$payload[$dataTag] = $response->original->resource->items();
} else {
$payload[$dataTag] = json_decode($response->content(), true);
}
Expand Down

0 comments on commit a2dbbc4

Please sign in to comment.