我已经根据模型将数据查出来了,该怎么渲染到模板上呢?结构是这样的:
"id": 2,
"uid": 1,
"nid": 26,
"is_hidden": "0",
"body": "`Enjoy MarkDown!Coding now...`",
"created_at": "2017-11-16 06:20:49",
"updated_at": "2017-11-16 06:20:49",
"pid": 0,
"user": {
"id": 1,
"nickname": "jiberboom",
"pic": "http://www.bigmonkey2.top/storage/static/head.png"
},
"allreplys": [
{
"id": 3,
"uid": 2,
"nid": 26,
"is_hidden": "0",
"body": "`Enjoy MarkDown!Coding now... too`",
"created_at": "2017-11-16 06:20:49",
"updated_at": "2017-11-16 06:20:49",
"pid": 2,
"user": {
"id": 2,
"name": "Lonzo Tillman",
"email": "[email protected]",
"nickname": "Daija Mann",
"website": "http://www.veum.com/qui-neque-quis-odio-esse.html",
"qq": "8434708",
"weixin": "Marvin Welch",
"pic": "http://jiberboom.top/public/storage/person_default.png",
"level": 1,
"status": "1",
"comments": 1,
"created_at": "2017-10-26 11:52:52",
"updated_at": "2017-10-26 11:52:52",
"api_token": "lNktujkQZFhA1IS4zZwqdcRFVMmvw8WbKNDK21Uihue0OLOCXRzU08wgaonGKl0E"
},
"allreplys": [
{
"id": 4,
"uid": 3,
"nid": 26,
"is_hidden": "0",
"body": "`Enjoy MarkDown!Coding now... three`",
"created_at": "2017-11-16 06:20:49",
"updated_at": "2017-11-16 06:20:49",
"pid": 3,
"user": {
"id": 3,
"name": "Augusta Johnson",
"email": "[email protected]",
"nickname": "Ruth Kertzmann IV",
"website": "http://www.kutch.com/sunt-eum-non-et-veritatis",
"qq": "1969778",
"weixin": "Jaron Okuneva",
"pic": "http://jiberboom.top/public/storage/person_default.png",
"level": 1,
"status": "1",
"comments": 1,
"created_at": "2017-10-26 11:52:52",
"updated_at": "2017-10-26 11:52:52",
"api_token": "AvKnhjngXmOHMVWlCszX5hduyCnnGeDOTAZftiZ9cduMqfA6Hy5QLfQCogbb9uE4"
},
"allreplys": [
]
}
]