public function updaterole(RoleRequest $request, $id)
 {
     $data = $request->all();
     $this->repository->update($data, $id);
     Session::put('success', 'Alterado com sucesso');
     return redirect()->route('admin.users.index');
 }
 public function updatepassword(PasswordRequest $request, $id)
 {
     $data = $request->all();
     $data['password'] = bcrypt($data['password']);
     $this->repository->update($data, $id);
     Session::put('success', 'Alterado com sucesso');
     return redirect()->route('layout.client');
 }
 public function update(array $data, $id)
 {
     $this->clientRepository->update($data, $id);
     $userId = $this->clientRepository->find($id, ['user_id'])->user_id;
     $this->userRepository->update($data['user'], $userId);
 }