public function getTag($id) { $article = Article::getArticleListByTagId($id); $page = new EndaPage($article['page']); viewInit(); return homeView('searchTag', ['articleList' => $article, 'tagName' => Tag::getTagNameByTagId($id), 'page' => $page]); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $article = Article::getArticleModelByArticleId($id); ArticleStatus::updateViewNumber($id); $data = array('article' => $article); viewInit(); return homeView('article', $data); }
/** * 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) { // $userInfo = User::getUserInfoModelByUserId($id); if (empty($userInfo)) { return redirect('/'); } $userArticle = Article::getArticleModelByUserId($id); viewInit(); return homeView('about', ['userInfo' => $userInfo, 'userArticle' => $userArticle]); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { // $article = Article::getArticleModelByArticleId($id); $tags = Tag::getTagModelByTagIds($article->tags); $authorArticle = Article::getArticleModelByUserId($article->user_id); $commentList = Comment::getCommentListModel($id); $data = array('article' => $article, 'tags' => $tags, 'authorArticle' => $authorArticle, 'commentList' => $commentList); viewInit(); return homeView('article', $data); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { // $article = Article::getArticleModelByArticleId($id); $tags = Tag::getTagModelByTagIds($article->tags); $authorArticle = Article::getArticleModelByUserId($article->user_id); ArticleStatus::updateViewNumber($id); $data = array('article' => $article, 'tags' => $tags, 'authorArticle' => $authorArticle); viewInit(); return homeView('article', $data); }
/** * 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]); }
public function getTag($id) { $article = Article::getArticleListByTagId($id); viewInit(); return homeView('searchTag', ['article' => $article, 'tagName' => Tag::getTagNameByTagId($id)]); }