/** * 显示历史公告 */ public function history() { return response()->json(Represent::getBoardList()); }
/** * 获取最新的公告栏 * * @return array */ private function obtainRepresent() { $new = \App\Represent::getNewestAnnouncement(); return is_null($new) ? $this->emptyRepresent : $new->toArray(); }