first(); } /** * 根据名称查找 * @param $name * @return mixed */ static function getByName($book_name) { return self::where('book_name', $book_name)->get(); } /** * 根据code查找 * @param $code * @return mixed */ static function getByCode($code) { return self::where('code', $code)->get(); } /** * 获取列表 * @return mixed */ static function getList() { return self::paginate(); } static function updateStatus($id,$params=[]) { if ($params){ return self::where('id',$id)->update($params); } } }