mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
Model类的json类型转换支持传入参数
This commit is contained in:
@@ -325,7 +325,8 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
case 'array':
|
||||
$value = (array) $value;
|
||||
case 'json':
|
||||
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
|
||||
$option = !empty($param) ? (intval)$param : JSON_UNESCAPED_UNICODE;
|
||||
$value = json_encode($value, $option);
|
||||
break;
|
||||
case 'serialize':
|
||||
$value = serialize($value);
|
||||
|
||||
Reference in New Issue
Block a user