/** * @param int $num * * @return mixed */ public function getNewest($num = 20) { $unviewableForums = $this->permissionChecker->getUnviewableIdsForContent('forum'); return $this->postModel->orderBy('created_at', 'desc')->with(['topic', 'topic.forum', 'author'])->whereNotIn('topic.forum_id', $unviewableForums)->take($num)->get(); }