public function update(ChangePasswordRequest $request, Guard $auth)
    {
        try {
            $this->dispatch(new ChangePassword($auth->user()->id, $request->get('current_password'), $request->get('new_password')));
            return redirect()->route('authentication::profile.show');
        } catch (ValidationException $e) {
            return redirect()->back()->withErrors($e->errors());
        }
    }
public function update(ChangePasswordRequest $request, Guard $auth)
    {
        try {
            $this->dispatch(new ChangePassword($auth->user()->id, $request->get('current_password'), $request->get('new_password')));
            return redirect()->route('authentication::profile.show');
        } catch (ValidationException $e) {
            return redirect()->back()->withErrors($e->errors());
        }
    }
public function update ( ChangePasswordRequest $ request , Guard $ auth ) { try { $ this -> dispatch ( new ChangePassword ( $ auth -> user ( ) -> id , $ request -> get ( 'current_password' ) , $ request -> get ( 'new_password' ) ) ) ; return redirect ( ) -> route ( 'authentication::profile.show' ) ; } catch ( ValidationException $ e ) { return redirect ( ) -> back ( ) -> withErrors ( $ e -> errors ( ) ) ; } }
Attempts to update the password.

@param ChangePasswordRequest $request
@param Guard $auth
@return $this|RedirectResponse
Attempts to update the password .