/**
  * Display the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function show($id, $pageNo)
 {
     //$category = ArticleCategory::with("articles")->find($id);
     $category = ArticleCategory::find($id);
     $teachers = Teacher::topN(6);
     //query()->orderBy('ord_no')->where('in_intro', '1')->take(6)->get();
     $articles = $category->articles()->getResults();
     $other_articles = Article::topN(6);
     $categories_in_pane = ArticleCategory::all();
     //dd($categories_in_pane);
     //$articleCnt = $category->articles()->getResults();
     $resp = view('site.category', array('category' => $category, 'teachers' => $teachers, 'articles' => $articles, 'other_articles' => $other_articles, 'categories_in_pane' => $categories_in_pane));
     //$resp = view('site.test', array('category'=>$category, 'teachers'=>$teachers, 'articles'=>$articles));
     return $resp;
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param $id
  * @return Response
  */
 public function postDelete(DeleteRequest $request, $id)
 {
     $newscategory = ArticleCategory::find($id);
     $newscategory->delete();
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show(ArticleCategory $category)
 {
     $article = ArticleCategory::find($category->id)->articles()->get();
     return view('category.article.index', compact('article'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $category = ArticleCategory::find($id);
     $category->delete();
     return back()->with('message', "Категория " . $category->title . " удалена");
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     ArticleCategory::find($id)->delete();
     Session::flash('success', "Data kategori artikel berhasil dihapus!");
     return redirect()->route('admin.article-category.index');
 }