update([ 'active_status' => 0, 'updated_by' => Auth::user()->name ]); $ar = ReferenceAr::find($id); if ($ar) { $this->update($ar, ['active_status' => 1]); } DB::commit(); return $ar; } catch (\Exception $e) { DB::rollBack(); throw $e; } } }