标签:sub ret 渲染 user stat hold BMI 用户 instance
<link rel="stylesheet" href="__STATIC__/css/bootstrap.min.css"/>
<form action="{:url(‘index/sou‘)}" method="post">
<input type="text" placeholder="请输入管理员名称" name="word"/><input type="submit" value="搜用户"/>
public function sou(){
$word=Request::instance()->param("word");
$res=Db::table("user")
->where("phone","like","%$word%")
->whereOr("name","like","%$word%")
->paginate(3,false,[‘query‘=>request()->param()]);
// print_r($res);
$this->assign(‘list‘, $res);
$count = Db::table("user")->count();
// 渲染模板输出
return $this->fetch("show",[‘arr‘=>$res,‘a‘=>$count]);
}
标签:sub ret 渲染 user stat hold BMI 用户 instance
原文地址:https://www.cnblogs.com/gwhm/p/10223696.html