Skip to content

Commit

Permalink
add raw response format to JsonApiResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed May 6, 2024
1 parent 95168f0 commit 5d806db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Http/JsonApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
};
}
Expand Down

0 comments on commit 5d806db

Please sign in to comment.