/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $article = \Article::find($id); if (!$article) { return Msgbox::error('文档不存在'); } //读取分类 $categories = \Category::selectOptions(); //读取tags $tags = $article->getTags(); $values = array('article' => $article, 'categories' => $categories, 'tags' => $tags); return View::make('admin/article/edit', $values); }