示例#1
0
 public function show($topicId)
 {
     try {
         $topic = TopicDao::findById($topicId);
     } catch (NoElementException $e) {
         App::abort(404, 'Topic not found');
     }
     $articles = ArticleDao::findByTopicPaginated($topicId, self::PAGE_SIZE);
     return view('topic.details')->with(array('topic' => $topic, 'articles' => $articles));
 }