From 60a2acf3c7e812e2da42d92a749754743cdaad09 Mon Sep 17 00:00:00 2001 From: vanthao03596 <34786441+vanthao03596@users.noreply.github.com> Date: Sun, 21 Mar 2021 22:04:24 +0700 Subject: [PATCH] Use JsonResponse instead response() helper --- src/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Response.php b/src/Response.php index 0c89f7d..d44a902 100644 --- a/src/Response.php +++ b/src/Response.php @@ -377,6 +377,6 @@ function ($response) use ($resource) { */ protected function response($data = [], $status = 200, array $headers = [], $options = 0): JsonResponse { - return response()->json($data, $status, $headers, $options); + return new JsonResponse($data, $status, $headers, $options); } }