public function getTopic() { if (!is_null($this->topic)) { return $this->topic; } /** @var TopicModel $topic */ $topic = TopicModel::findOrFail((int) $this->property('id')); if ($topic) { $topic->increaseReadCount(); } return $this->topic = $topic; }