/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     //
     viewInit();
     $category = Category::getCatInfoModelByAsName($id);
     if (empty($category)) {
         return redirect(url(route('article.index')));
     }
     $article = Article::getNewsArticle($category->id, 10);
     return homeView('category', ['category' => $category, 'article' => $article]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function show($id)
 {
     //
     viewInit();
     $category = Category::getCatInfoModelByAsName($id);
     if (empty($category)) {
         return redirect(url(route('article.index')));
     }
     $article = Article::getArticleListByCatId($category->id, 10);
     $page = new EndaPage($article['page']);
     return homeView('category', ['category' => $category, 'articleList' => $article, 'page' => $page]);
 }