/** * Remove the specified User from storage. * * @param int $id * * @return Response */ public function destroy($id) { $user = $this->userRepository->find($id); if (empty($user)) { $this->throwRecordNotFoundException("User not found", ERROR_CODE_RECORD_NOT_FOUND); } $user = $this->userRepository->delete($id); $meta = array('total' => count($user), 'count' => count($user), 'offset' => 0, 'last_updated' => $this->userRepository->lastUpdated(), 'status' => "User deleted successfully.", 'error' => 'Success'); return Response::json(ResponseManager::makeResult($id, $meta)); }