/** * Display a listing of the resource. * * @return Response */ public function index() { // $article = Article::getNewsArticle(8); viewInit(); $page = new EndaPage($article['page']); return homeView('index', array('articleList' => $article, 'page' => $page)); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // $article = Article::getNewsArticle(); $hotArticle = ArticleStatus::getHotArticle(3, false); viewInit(); return homeView('index', array('article' => $article, 'hotArticle' => $hotArticle)); }
/** * 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]); }