public function update($id, UpdateUserRequest $request)
    {
        $user = $this->userRepository->findWithoutFail($id);

        if (empty($user)) {
            Flash::error(trans('l5starter::messages.404_not_found'));

            return redirect(route('admin.users.index'));
        }

        $user = $this->userRepository->update($request->all(), $id);

        Flash::success(trans('l5starter::messages.update.success'));

        return redirect(route('admin.users.index'));
    }
public function update($id, UpdateUserRequest $request)
    {
        $user = $this->userRepository->findWithoutFail($id);

        if (empty($user)) {
            Flash::error(trans('l5starter::messages.404_not_found'));

            return redirect(route('admin.users.index'));
        }

        $user = $this->userRepository->update($request->all(), $id);

        Flash::success(trans('l5starter::messages.update.success'));

        return redirect(route('admin.users.index'));
    }
public function update ( $ id , UpdateUserRequest $ request ) { $ user = $ this -> userRepository -> findWithoutFail ( $ id ) ; if ( empty ( $ user ) ) { Flash :: error ( trans ( 'l5starter::messages.404_not_found' ) ) ; return redirect ( route ( 'admin.users.index' ) ) ; } $ user = $ this -> userRepository -> update ( $ request -> all ( ) , $ id ) ; Flash :: success ( trans ( 'l5starter::messages.update.success' ) ) ; return redirect ( route ( 'admin.users.index' ) ) ; }
Update the specified User in storage.

@param  int              $id
@param UpdateUserRequest $request

@return Response
Update the specified User in storage .