This commit is contained in:
2021-09-10 13:59:38 +08:00
parent 4d670018f2
commit 7954345cc4
+1 -2
View File
@@ -16,9 +16,8 @@ class Parse
public static function data($content, $contentType): mixed
{
if (str_contains($contentType, 'json')) {
return json_encode($content);
return json_encode($content,true);
}
var_dump($contentType);
if (str_contains($contentType, 'xml')) {
return Xml::toArray($content);
}