problem description
Page-by-page rendering to html page, tag cannot be rendered, surrounded by ""
related codes
/ / Please paste the code text below (do not replace the code with pictures)
//model
public function getFirstCategory($parentId = 0) {
$data = [
"parent_id" => $parentId,
"status" => [0, 1],
];
$order = [
"id" => "desc"
];
$result = $this->where($data)->order($order)->paginate(2);
return $result;
}
//controller
public function index()
{
$parentId = input("get.parent_id",0,"intval");
$categorys = model("Category") -> getFirstCategory($parentId);
$list = $categorys->render();
return $this -> fetch("",[
"categorys" => $categorys,
"list" => $list
]);
}
//html
<div>{$list}</div>
result
the html code is not rendered, but is displayed as text