interestCircle = $interestCircle; $this->interestCircleArticle = $interestCircleArticle; $this->post = $post; } /** * 内容列表 */ public function lists($request) { $perPage = isset($request['per_page']) ? $request['per_page'] : 20; $where[] = ['interest_circle_articles.circle_id', $request['id']]; $articleModel = $this->post; return $articleModel ->join('interest_circle_articles', 'interest_circle_articles.post_id', '=', 'post.id') ->select('post.*', 'interest_circle_articles.is_recommend', 'interest_circle_articles.circle_id') ->where($where) ->orderBy('interest_circle_articles.is_recommend', 'desc') ->orderBy('post.weight', 'desc') ->paginate($perPage); } }