range_id); if (!$range) { throw new RecordNotFoundException(); } $user = \User::findCurrent(); if (!Authority::canShowForum($user, $range)) { throw new AuthorizationFailedException(); } $postings = $discussion->postings ?? \SimpleORMapCollection::createFromArray([]); if ($user) { PostingRead::updateUserReadPoint($user->user_id, $discussion->discussion_id, count($postings)); } return $this->getPaginatedContentResponse( $postings->limit(...$this->getOffsetAndLimit()), count($postings) ); } }