/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(UpdateArticalRequest $request, $id) { $data = $request->only(['name']); Artical::findOrFail($id)->update($data); return redirect()->route('admin.' . URI . '.index'); }
/** * 更新文章 */ public function update($id, ArticalRequest $request) { $article = Artical::findOrFail($id); $article->update($request->all()); return redirect('articles'); }