public function showCategoryTopics($name) { $name = isset($name) ? urldecode($name['action']) : show(404); $topics = Topic::getTopicByCategory($name) or redirect(404); $singleTopic = $topics[0]; echo $this->blade->render('category-topics', compact('topics', 'singleTopic')); }