public function actionTopic($title) { $topicId = explode('-', $title)[1]; $categoryModel = $this->findModel($topicId); return $this->render('single-topic', ["categoryModel" => $categoryModel, "topicPosts" => DiscussionCategories::getSingleCategoryWithPosts($categoryModel['id'])]); }