コード例 #1
0
 /**
  * 组合私信内容
  *
  * @param $data
  * @return mixed
  * @author yangyifan <*****@*****.**>
  */
 private static function mergeLetter($data)
 {
     if (!empty($data)) {
         foreach ($data as $letter) {
             $letter->user_info = ProfileModel::getUserSimpleInfo($letter->user_info_id);
         }
     }
     return $data;
 }
コード例 #2
0
 /**
  * 获得帖子评论信息
  *
  * @param $id
  * @return mixed
  * @author yangyifan <*****@*****.**>
  */
 private static function getForumComment($id)
 {
     $comment_list = DB::table('forum_comment')->where('forum_id', '=', $id)->where('status', '=', '1')->orderBy('id', 'DESC')->paginate(config('config.forum_comment_page_limit'));
     if (!empty($comment_list)) {
         foreach ($comment_list as $comment) {
             $comment->user_info = ProfileModel::getUserSimpleInfo($comment->user_info_id);
         }
     }
     return $comment_list;
 }