model = new AdminModel(); parent::__construct($app); } /** * @param Request $request * @return \think\response\View * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function index(Request $request) { $admins = $this->model->findAdmins(); View::assign('admins', $admins); return view(); } public function add() { return view(); } }