repository = $repository; } /** * @return mixed * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * @author xaboy * @day 2020-03-31 */ public function lst() { $where = $this->request->params(['keyword']); [$page, $limit] = $this->getPage(); $lst = $this->repository->getList($where, $page, $limit); return app('json')->success($lst); } /** * @return mixed * @throws DataNotFoundException * @throws DbException * @throws ModelNotFoundException * @throws FormBuilderException * @author xaboy * @day 2020-03-31 */ public function updateTable() { $data = $this->request->param(); $form = $this->repository->updateForm($data); return app('json')->success(formToData($form)); } /** * @param int $key * @return mixed * @throws DbException * @author xaboy * @day 2020-03-27 */ public function update($key) { $data = $this->request->param(); $this->repository->updateAward($key,$data); return app('json')->success('修改成功'); } }