/** * Update the specified resource in storage. * * @return Response */ public function update(UserUpdateRequest $request) { // Gather Input $data = $request->all(); $data['id'] = $this->userRepository->getUser()->id; // Attempt to update the user $result = $this->userRepository->update($data); // Done! return $this->redirectViaResponse('profile_update', $result); }
/** * Update the specified resource in storage. * * @param string $hash * * @return Redirect */ public function update(UserUpdateRequest $request, $hash) { // Gather Input $data = $request->all(); // Decode the hashid $data['id'] = $this->hashids->decode($hash)[0]; // Attempt to update the user $result = $this->userRepository->update($data); // Done! return $this->redirectViaResponse('users_update', $result); }