public function update(Listener $listener, array $input)
    {
        $user = Auth::user();

        if (! $this->validateCurrentUser($user, $input)) {
            return $listener->abortWhenUserMismatched();
        }

        $validation = $this->validator->on('update')->with($input);

        if ($validation->fails()) {
            return $listener->updateProfileFailedValidation($validation->getMessageBag());
        }

        try {
            $this->saving($user, $input);
        } catch (Exception $e) {
            return $listener->updateProfileFailed(['error' => $e->getMessage()]);
        }

        return $listener->profileUpdated();
    }
public function update(Listener $listener, array $input)
    {
        $user = Auth::user();

        if (! $this->validateCurrentUser($user, $input)) {
            return $listener->abortWhenUserMismatched();
        }

        $validation = $this->validator->on('update')->with($input);

        if ($validation->fails()) {
            return $listener->updateProfileFailedValidation($validation->getMessageBag());
        }

        try {
            $this->saving($user, $input);
        } catch (Exception $e) {
            return $listener->updateProfileFailed(['error' => $e->getMessage()]);
        }

        return $listener->profileUpdated();
    }
public function update ( Listener $ listener , array $ input ) { $ user = Auth :: user ( ) ; if ( ! $ this -> validateCurrentUser ( $ user , $ input ) ) { return $ listener -> abortWhenUserMismatched ( ) ; } $ validation = $ this -> validator -> on ( 'update' ) -> with ( $ input ) ; if ( $ validation -> fails ( ) ) { return $ listener -> updateProfileFailedValidation ( $ validation -> getMessageBag ( ) ) ; } try { $ this -> saving ( $ user , $ input ) ; } catch ( Exception $ e ) { return $ listener -> updateProfileFailed ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ listener -> profileUpdated ( ) ; }
Update profile information.

@param  \Orchestra\Contracts\Foundation\Listener\Account\ProfileUpdater  $listener
@param  array  $input

@return mixed
Update profile information .