/** * Get the list of comments for a given content. * * @param array $args * @param \Vinelab\Minion\Dictionary $data * * @return void */ public function get($args, Dictionary $data) { TokenAuth::loginWithToken($data->access_token); $content = Content::make($data); return Api::content(['CommentMapper', 'mapFromCache'], $this->comments->get($content, Pagination::make($data)), $this->comments->totalForContent($content)); }
/** * Get the comments for moderation skipping the given offset. * * @param int $offset * * @return \Illuminate\Support\Collection */ public function getForModeration($offset) { $offset = $offset && is_numeric($offset) ? $offset : 0; $limit = Config::get('comments.moderation.limit'); return $this->comments->get($limit, $offset, ['content', 'likes', 'reports', 'user']); }