/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //删除所有文章,包括子栏目文章
     //删除所有子栏目
     $cat = ArticleCat::find($id);
     $cat->delete();
     return Redirect::to('admin/article/cats');
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $article = Article::find($id);
     //栏目下拉框
     $articleCats = ArticleCat::getSelectCats();
     return view('admin.articles.edit')->with('article', $article)->with('articleCats', $articleCats);
 }
 public function indexContent()
 {
     return view('admin.index_content')->with('pages', Page::take(20)->get())->with('articleCats', ArticleCat::all())->with('articles', Article::all());
 }