From a2dbbc4fef0b8aa780bce103e5a3f91891e7e372 Mon Sep 17 00:00:00 2001 From: Stephen Lake Date: Tue, 30 Jul 2019 14:49:14 +0200 Subject: [PATCH] Don't cast array to array --- src/Http/Middleware/ApiResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Middleware/ApiResponse.php b/src/Http/Middleware/ApiResponse.php index 590533b..73a7a69 100644 --- a/src/Http/Middleware/ApiResponse.php +++ b/src/Http/Middleware/ApiResponse.php @@ -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); }