order(['sort' => 'asc'])->select(); Cache::set('hema_link', $link); } return Cache::get('hema_link'); } /** * 添加 */ public function add(array $data) { $this->deleteCache(); return $this->save($data); } /** * 编辑 */ public function edit(array $data) { $this->deleteCache(); return $this->save($data) !== false; } /** * 删除 */ public function remove() { $this->deleteCache(); return $this->delete(); } /** * 删除缓存 */ private function deleteCache() { return Cache::delete('hema_link'); } }