示例#1
0
 public function show($authorId)
 {
     try {
         $author = AuthorDao::findById($authorId);
     } catch (NoElementException $e) {
         App::abort(404, 'Author not found');
     }
     $articles = ArticleDao::findByAuthor($authorId);
     $articles = ArticleService::getEnrichedArticles($articles);
     return view('author.details')->with(array('author' => $author, 'articles' => $articles));
 }