save(); return $notice; } /** * 获取通知类型列表 * @return mixed */ public static function getAllNoticeTypeList() { $noticeTypes = NoticeType::all(); return $noticeTypes; } /** * 判断通知类型名称是否存在 * @param $name * @return bool */ public static function existNoticeTypeName($name) { return NoticeType::isNameExist($name); } /** * 保存通知类型列表 * @param $params * @return mixed */ public static function addNoticeType($params) { $noticeTypes = NoticeType::create($params); return $noticeTypes; } /** * 删除公告类型ID * @param $id */ public static function rmNoticeType($id) { NoticeType::where('id', $id)->delete(); } }