/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(AbsensiRequest $request, $id) { // $input = $request->only('id_mahasiswa', 'id_jurusan', 'absen', 'tanggal', 'bulan', 'tahun'); $absensi = Absensi::find($id); if ($absensi->update($input)) { return response()->json(array('success' => TRUE)); } }
public function update(Absensi $absensi, AbsensiRequest $request) { $absensi->update($request->all()); flash()->overlay('Data absensi berhasil diubah!'); return redirect('absensi'); }