/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(PegawaiRequest $request, $id) { // $input = $request->all(); $pegawai = Pegawai::find($id); $pegawai->status = "admin"; if ($pegawai->update($input)) { // return response()->json(array('success' => TRUE)); return response()->json(['success' => true, 'msg' => 'Data Behasil Di Perbarui']); } }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(PegawaiRequest $request, $id) { // $input = $request->all(); $pegawai = Pegawai::find($id); if ($pegawai->update($input)) { return response()->json(array('success' => TRUE)); } }