示例#1
0
 /**
  * 编辑文章
  *
  * @param integer $id 
  *
  * @return Response
  */
 public function getEdit($id)
 {
     $post = Post::with('termRelation')->findOrFail($id);
     $categories = Category::getTree();
     return View::make('backend.pages.post-edit')->withPost($post)->withCategories($categories);
 }
示例#2
0
 /**
  * 编辑分类
  *
  * @param integer $id 
  *
  * @return Response
  */
 public function getEdit($id)
 {
     $category = Category::findOrFail($id);
     $categories = Category::getTree();
     return View::make('backend.pages.category-edit')->withCategory($category)->withCategories($categories);
 }