Response::json返回Eloquent对象id本地和服务端类型不同

本人本地系统为mac,服务器为ubuntu,使用php版本均为PHP 5.5.14

但是使用Response::json返回Eloquent对象时,本地返回的id是num类型的,服务器返回的是string类型,具体如下所示,小弟想知道是什么原因导致。

服务器返回
{
"status": {
"code": 0,
"msg": "服务正常"
},
"data": [
{
"id": "1",
"created_at": "2015-03-14 14:44:10",
"updated_at": "2015-03-14 14:44:10",
"group_name": "test",
"group_description": "test groupdescription",
"head_url": null,
"creator": "1"
}
]
}

本地返回
{
"status": {
"code": 0,
"msg": "服务正常"
},
"data": [
{
"id": 1,
"created_at": "2015-03-14 14:44:10",
"updated_at": "2015-03-14 14:44:10",
"group_name": "test",
"group_description": "test groupdescription",
"head_url": null,
"creator": 1
}
]
}
已邀请:

要回复问题请先登录注册