json_encode to keep UTF-8 format

Key:

json_encode($content, JSON_UNESCAPED_UNICODE);

Example

    protected function success_response($data, $extra=null){
        $response = [
            'status' => 'success', 
            'data' => $data, 
            'extra' => $extra
        ];

        //header('Content-Type: application/json');
        //echo json_encode($response);
        //exit();
        return response()->json($response, 
            200,
            ['Content-Type' => 'application/json;charset=UTF-8', 'Charset' => 'utf-8'],
            JSON_UNESCAPED_UNICODE
        );
    }

Reference: