public function update(Request $request, Article $article){ $this->validate($request, [ 'login_id' => 'required|min:3', 'role' => 'required|min:2', 'name' => 'required|min:2', 'password' => 'required', 'mail' => 'required', 'test_mail' => 'required', 'updated_person' => 'required|min:3' ]); $article->login_id = $request->login_id; $article->role = $request->role; $article->name = $request->name; $article->password = $request->password; $article->mail = $request->mail; $article->test_mail = $request->test_mail; $article->updated_person = $request->updated_person; $article->save(); return redirect('/'); }
渡されたメソッドのupdate
なるほど~