改名
This commit is contained in:
@@ -16,10 +16,10 @@ class Parse
|
|||||||
public static function data($content, $contentType): mixed
|
public static function data($content, $contentType): mixed
|
||||||
{
|
{
|
||||||
if (str_contains($contentType, 'json')) {
|
if (str_contains($contentType, 'json')) {
|
||||||
return json_encode($contentType);
|
return json_encode($content);
|
||||||
}
|
}
|
||||||
if (str_contains($contentType, 'xml')) {
|
if (str_contains($contentType, 'xml')) {
|
||||||
return Xml::toArray($contentType);
|
return Xml::toArray($content);
|
||||||
}
|
}
|
||||||
if (str_contains($contentType, 'x-www-form-urlencoded')) {
|
if (str_contains($contentType, 'x-www-form-urlencoded')) {
|
||||||
parse_str($content, $array);
|
parse_str($content, $array);
|
||||||
|
|||||||
Reference in New Issue
Block a user