根据老师的gradeList修改的
public function imgList()
{
$Image = img_tb::all();
$count = img_tb::count();
foreach ($Image as $value) {
$data = [
'id' => $value->id,
'name' => $value->name,
'img' => $value->img,
'update_time' => $value->update_time,
];
$ImgList[] = $data;
}
$this->view->assign('imgList',$ImgList);
$this->view->assign('count',$count);
//渲染图片列表模板
return $this -> fetch('img_list');
}