コード例 #1
0
 public function getUpdate(Request $r)
 {
     $this->validate($r, ['nama' => 'required|unique:app_legalitas_produksi,id,' . $r->id]);
     $data = Legalitas::find($r->id);
     $data->nama = $r->nama;
     $data->save();
     return redirect()->back()->with(session()->flash('success', 'Berhasil menambah data'));
 }