From 5d806db0a2a641c0b4300644f0d8d92f4dfa4ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rube=CC=81n=20Robles?= Date: Mon, 6 May 2024 18:06:14 +0200 Subject: [PATCH] add raw response format to JsonApiResponse --- src/Http/JsonApiResponse.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Http/JsonApiResponse.php b/src/Http/JsonApiResponse.php index 121ba45..f5b90e1 100644 --- a/src/Http/JsonApiResponse.php +++ b/src/Http/JsonApiResponse.php @@ -181,6 +181,7 @@ protected function serializeResponse(mixed $response): mixed return match ($requesterAccepts) { 'application/json' => $response instanceof Builder ? $response->simplePaginate() : $response, 'application/vnd.api+json' => Apiable::toJsonApi($response), + 'raw' => $response, default => throw new HttpException(406, 'Not acceptable response formatting'), }; }