public static function getPosts($post_id) { $list_id = PostRecommend::where("post_id", $post_id)->orderBy("rank", "desc")->take(10)->get(["post_id_recommend"]); $results = UserPosts::whereIn("post_id", $list_id)->get(); return $results; }