/**
  * Update the specified ActivityLog in storage.
  *
  * @param  int    $id
  * @param CreateActivityLogRequest $request
  *
  * @return Response
  */
 public function update($id, CreateActivityLogRequest $request)
 {
     $activityLog = $this->activityLogRepository->find($id);
     if (empty($activityLog)) {
         Flash::error('ActivityLog not found');
         return redirect(route('activityLogs.index'));
     }
     $activityLog = $this->activityLogRepository->updateRich($request->all(), $id);
     Flash::message('ActivityLog updated successfully.');
     return redirect(route('activityLogs.index'));
 }
 /**
  * Update the specified ActivityLog in storage.
  *
  * @param  int    $id
  * @param Request $request
  *
  * @return Response
  */
 public function update($id, Request $request)
 {
     $activityLog = $this->activityLogRepository->find($id);
     if (empty($activityLog)) {
         $this->throwRecordNotFoundException("ActivityLog not found", ERROR_CODE_RECORD_NOT_FOUND);
     }
     $input = $request->all();
     $meta = array('total' => count($activityLog), 'count' => count($activityLog), 'offset' => 0, 'last_updated' => $this->activityLogRepository->lastUpdated(), 'status' => "ActivityLog updated successfully.", 'error' => 'Success');
     $activityLog = $this->activityLogRepository->updateRich($input, $id);
     if (!$activityLog) {
         $this->throwRecordNotFoundException("ActivityLog not saved", ERROR_CODE_VALIDATION_FAILED);
     }
     $activityLog = $this->activityLogRepository->find($id);
     return Response::json(ResponseManager::makeResult($activityLog->toArray(), $meta), 201);
 }