/** * 删除版块 * @param $id */ public function delete($id) { try { $model = new BoardModel(); if ($model->delete($id) === false) { throw new Exception('删除失败'); } $this->redirect('index'); } catch (Exception $e) { $this->error($e->getMessage()); } }