circle_id = $circleId; } public function transform(Post $post) { $key = 'circle_articles_' . $this->circle_id; $isexists = Redis::zscore($key, $post['id']); return [ 'id' => $post['id'], 'created_at' => Carbon::parse($post['created_at'])->toDateTimeString(), 'uid' => $post['uid'], 'username' => $post['username'], 'topic' => $this->getTopic($post['topic_ids'], 1), 'content' => subtext(strip_tags($post['content']), 20), 'image' => $post['img'], 'is_exists_circle' => $isexists ? 1 : 0, ]; } }