コード例 #1
0
 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');
 }
コード例 #2
0
 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');
 }
コード例 #3
0
 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);
 }