platform/admin/app/Http/Controllers/Auth/ChangePasswordController.php
/**
     * @param Request $request
     * @return mixed
     * @throws ValidationException
     */
@param Request $request
@return mixed
@throws ValidationException
@param Request $request @return mixed @throws ValidationException
public function changePassword(Request $request)
    {
        $this->validate($request, $this->rules(), $this->validationErrorMessage(), $this->customAttributes());
        $user = \Auth::user();
        if (!$this->checkPasswordOld($user, $request->get('password_old')))
            throw ValidationException::withMessages(['password_old' => ['Current password is wrong.']]);
        return $this->processChangePassword($user, $request->get('password_new'))
            ? $this->sendChangeResponse()
            : $this->sendChangeFailedResponse();
    }
public function changePassword ( Request $ request ) { $ this -> validate ( $ request , $ this -> rules ( ) , $ this -> validationErrorMessage ( ) , $ this -> customAttributes ( ) ) ; $ user = \ Auth :: user ( ) ; if ( ! $ this -> checkPasswordOld ( $ user , $ request -> get ( 'password_old' ) ) ) throw ValidationException :: withMessages ( [ 'password_old' => [ 'Current password is wrong.' ] ] ) ; return $ this -> processChangePassword ( $ user , $ request -> get ( 'password_new' ) ) ? $ this -> sendChangeResponse ( ) : $ this -> sendChangeFailedResponse ( ) ; }
@param Request $request
 @return mixed
 @throws ValidationException
@param Request $request @return mixed @throws ValidationException