From 22fdd05314d45281d843de9de9de6444a64c41b6 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 21 Nov 2017 22:34:07 -0800 Subject: [PATCH] Add UTF charset --- app/Http/Controllers/Api/ReportsController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/ReportsController.php b/app/Http/Controllers/Api/ReportsController.php index 3731122507..10f63da415 100644 --- a/app/Http/Controllers/Api/ReportsController.php +++ b/app/Http/Controllers/Api/ReportsController.php @@ -50,11 +50,9 @@ class ReportsController extends Controller $offset = request('offset', 0); $limit = request('limit', 50); $total = $actionlogs->count(); - $actionlogs = $actionlogs->orderBy($sort, $order); - $actionlogs = $actionlogs->skip($offset)->take($limit)->get(); - return (new ActionlogsTransformer)->transformActionlogs($actionlogs, $total); - + $actionlogs = $actionlogs->orderBy($sort, $order)->skip($offset)->take($limit)->get(); + return response()->json((new ActionlogsTransformer)->transformActionlogs($actionlogs, $total), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE); } }